+ if (phase2Select->isEnabled()) {
+ QString eap = eapSelect->currentText();
+ QString inner = phase2Select->currentText();
+ char phase2[32];
+ phase2[0] = '\0';
+ if (eap.compare("PEAP") == 0) {
+ if (inner.startsWith("EAP-"))
+ snprintf(phase2, sizeof(phase2), "auth=%s",
+ inner.right(inner.size() - 4).
+ toAscii().constData());
+ } else if (eap.compare("TTLS") == 0) {
+ if (inner.startsWith("EAP-"))
+ snprintf(phase2, sizeof(phase2), "autheap=%s",
+ inner.right(inner.size() - 4).
+ toAscii().constData());
+ else
+ snprintf(phase2, sizeof(phase2), "auth=%s",
+ inner.toAscii().constData());
+ } else if (eap.compare("FAST") == 0) {
+ if (inner.startsWith("EAP-"))
+ snprintf(phase2, sizeof(phase2), "auth=%s",
+ inner.right(inner.size() - 4).
+ toAscii().constData());
+ else if (inner.compare("GTC(auth) + MSCHAPv2(prov)") ==
+ 0) {
+ snprintf(phase2, sizeof(phase2),
+ "auth=GTC MSCHAPV2");
+ }
+ }
+ setNetworkParam(id, "phase2", phase2, true);
+ }