mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 774582 part2 - Unable to know if there is a user connected to Wifi tethering network. r=mrbkap
This commit is contained in:
parent
07345883f9
commit
49fae4c1ca
@ -77,9 +77,18 @@ WifiHotspotUtils::sendCommand(struct wpa_ctrl *ctrl, const char *cmd,
|
||||
} else if (ret < 0 || strncmp(reply, "FAIL", 4) == 0) {
|
||||
return -1;
|
||||
}
|
||||
if (strncmp(cmd, "PING", 4) == 0) {
|
||||
reply[*reply_len] = '\0';
|
||||
|
||||
// Make the reply printable.
|
||||
reply[*reply_len] = '\0';
|
||||
if (strncmp(cmd, "STA-FIRST", 9) == 0 ||
|
||||
strncmp(cmd, "STA-NEXT", 8) == 0) {
|
||||
char *pos = reply;
|
||||
|
||||
while (*pos && *pos != '\n')
|
||||
pos++;
|
||||
*pos = '\0';
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user