Parse the rssi result string in case-insensitive manner. This matches similar

code in wpa-supplicant, driver_wext.c

Change-Id: Ibeff41f9ef9168e47c338513b4c8c8781254e068
This commit is contained in:
Stan Chesnutt
2011-02-08 14:50:30 -08:00
parent 5ed9a80571
commit 320b56dcdd

View File

@@ -411,7 +411,7 @@ static jint android_net_wifi_getRssiHelper(const char *cmd)
char* lastSpace = strrchr(reply, ' ');
// lastSpace should be preceded by "rssi" and followed by the value
if (lastSpace && !strncmp(lastSpace - 4, "rssi", 4)) {
if (lastSpace && !strncasecmp(lastSpace - 4, "rssi", 4)) {
sscanf(lastSpace + 1, "%d", &rssi);
}
}