wpa_gui-qt4: Handle UNKNOWN COMMAND reply during peer window update

Avoid an infinite loop if wpa_supplicant is not built with AP support.
This commit is contained in:
Jouni Malinen 2009-09-11 17:52:46 +03:00 committed by Jouni Malinen
parent 611ed49118
commit acd8ba74c0

View File

@ -145,7 +145,8 @@ void Peers::update_peers()
while (*txt != '\0' && *txt != '\n')
txt++;
*txt++ = '\0';
if (strncmp(reply, "FAIL", 4) == 0)
if (strncmp(reply, "FAIL", 4) == 0 ||
strncmp(reply, "UNKNOWN", 7) == 0)
break;
QStringList lines = info.split(QRegExp("\\n"));