Lines Matching refs:reply
186 char reply[10], cmd[256];
224 memset(reply, 0, sizeof(reply));
225 reply_len = sizeof(reply) - 1;
228 wpagui->ctrlRequest("ADD_NETWORK", reply, &reply_len);
229 if (reply[0] == 'F') {
236 id = atoi(reply);
404 reply_len = sizeof(reply);
405 wpagui->ctrlRequest(cmd, reply, &reply_len);
406 if (strncmp(reply, "OK", 2) != 0) {
414 wpagui->ctrlRequest("SAVE_CONFIG", reply, &reply_len);
429 char reply[10], cmd[256];
433 reply_len = sizeof(reply);
434 wpagui->ctrlRequest(cmd, reply, &reply_len);
435 return strncmp(reply, "OK", 2) == 0 ? 0 : -1;
495 static int key_value_isset(const char *reply, size_t reply_len)
497 return reply_len > 0 && (reply_len < 4 || memcmp(reply, "FAIL", 4) != 0);
508 char reply[1024], cmd[256], *pos;
512 reply_len = sizeof(reply) - 1;
513 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 &&
514 reply_len >= 2 && reply[0] == '"') {
515 reply[reply_len] = '\0';
516 pos = strchr(reply + 1, '"');
519 ssidEdit->setText(reply + 1);
523 reply_len = sizeof(reply) - 1;
525 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) {
526 reply[reply_len] = '\0';
527 if (strstr(reply, "RSN") || strstr(reply, "WPA2"))
529 else if (strstr(reply, "WPA"))
535 reply_len = sizeof(reply) - 1;
536 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) {
537 reply[reply_len] = '\0';
538 if (strstr(reply, "WPA-EAP"))
540 else if (strstr(reply, "WPA-PSK"))
542 else if (strstr(reply, "IEEE8021X")) {
549 reply_len = sizeof(reply) - 1;
550 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) {
551 reply[reply_len] = '\0';
552 if (strstr(reply, "CCMP") && auth != AUTH_NONE_OPEN &&
555 else if (strstr(reply, "TKIP"))
557 else if (strstr(reply, "WEP"))
564 reply_len = sizeof(reply) - 1;
565 res = wpagui->ctrlRequest(cmd, reply, &reply_len);
566 if (res >= 0 && reply_len >= 2 && reply[0] == '"') {
567 reply[reply_len] = '\0';
568 pos = strchr(reply + 1, '"');
571 pskEdit->setText(reply + 1);
572 } else if (res >= 0 && key_value_isset(reply, reply_len)) {
577 reply_len = sizeof(reply) - 1;
578 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 &&
579 reply_len >= 2 && reply[0] == '"') {
580 reply[reply_len] = '\0';
581 pos = strchr(reply + 1, '"');
584 identityEdit->setText(reply + 1);
588 reply_len = sizeof(reply) - 1;
589 res = wpagui->ctrlRequest(cmd, reply, &reply_len);
590 if (res >= 0 && reply_len >= 2 && reply[0] == '"') {
591 reply[reply_len] = '\0';
592 pos = strchr(reply + 1, '"');
595 passwordEdit->setText(reply + 1);
596 } else if (res >= 0 && key_value_isset(reply, reply_len)) {
601 reply_len = sizeof(reply) - 1;
602 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 &&
603 reply_len >= 2 && reply[0] == '"') {
604 reply[reply_len] = '\0';
605 pos = strchr(reply + 1, '"');
608 cacertEdit->setText(reply + 1);
613 reply_len = sizeof(reply) - 1;
614 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 &&
616 reply[reply_len] = '\0';
618 if (eapSelect->itemText(i).compare(reply) == 0) {
620 if (strcmp(reply, "PEAP") == 0)
622 else if (strcmp(reply, "TTLS") == 0)
624 else if (strcmp(reply, "FAST") == 0)
634 reply_len = sizeof(reply) - 1;
635 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 &&
637 reply[reply_len] = '\0';
644 val = reply + 1;
652 if (strncmp(reply, "\"auth=", 6))
654 val = reply + 2;
658 if (strncmp(reply, "\"autheap=", 9) == 0) {
659 val = reply + 5;
661 } else if (strncmp(reply, "\"auth=", 6) == 0)
662 val = reply + 6;
665 if (strncmp(reply, "\"auth=", 6))
667 if (strcmp(reply + 6, "GTC auth=MSCHAPV2") == 0) {
671 val = reply + 2;
704 reply_len = sizeof(reply) - 1;
705 res = wpagui->ctrlRequest(cmd, reply, &reply_len);
706 if (res >= 0 && reply_len >= 2 && reply[0] == '"') {
707 reply[reply_len] = '\0';
708 pos = strchr(reply + 1, '"');
717 wepEdit->setText(reply + 1);
718 } else if (res >= 0 && key_value_isset(reply, reply_len)) {
731 reply_len = sizeof(reply) - 1;
732 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0) {
733 reply[reply_len] = '\0';
734 if (strcmp(reply, "SHARED") == 0)
740 reply_len = sizeof(reply) - 1;
741 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 1)
743 reply[reply_len] = '\0';
744 switch (atoi(reply)) {
761 reply_len = sizeof(reply) - 1;
762 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 &&
763 reply_len >= 2 && reply[0] == '"') {
764 reply[reply_len] = '\0';
765 pos = strchr(reply + 1, '"');
768 idstrEdit->setText(reply + 1);
772 reply_len = sizeof(reply) - 1;
773 if (wpagui->ctrlRequest(cmd, reply, &reply_len) >= 0 && reply_len >= 1)
775 reply[reply_len] = '\0';
776 prioritySpinBox->setValue(atoi(reply));
791 char reply[10], cmd[256];
803 reply_len = sizeof(reply);
804 wpagui->ctrlRequest(cmd, reply, &reply_len);
805 if (strncmp(reply, "OK", 2) != 0) {
812 wpagui->ctrlRequest("SAVE_CONFIG", reply, &reply_len);
828 char reply[256];
834 reply_len = sizeof(reply) - 1;
835 if (wpagui->ctrlRequest("GET_CAPABILITY eap", reply, &reply_len) < 0)
837 reply[reply_len] = '\0';
839 QString res(reply);