Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-wpa_supplicant_8: Commit

external/wpa_supplicant_8


Commit MetaInfo

Revisión68c7ea4c1886b7a59dd6a38da0e85a5373ca9602 (tree)
Tiempo2014-12-04 15:16:29
AutorVinit Deshpande <vinitd@goog...>
CommiterAndroid (Google) Code Review

Log Message

Merge "List all networks despite message limit of 4096 bytes" into lmp-mr1-dev

Cambiar Resumen

Diferencia

--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -1982,7 +1982,7 @@ static int wpa_supplicant_ctrl_iface_log_level(struct wpa_supplicant *wpa_s,
19821982
19831983
19841984 static int wpa_supplicant_ctrl_iface_list_networks(
1985- struct wpa_supplicant *wpa_s, char *buf, size_t buflen)
1985+ struct wpa_supplicant *wpa_s, char *cmd, char *buf, size_t buflen)
19861986 {
19871987 char *pos, *end;
19881988 struct wpa_ssid *ssid;
@@ -1997,6 +1997,17 @@ static int wpa_supplicant_ctrl_iface_list_networks(
19971997 pos += ret;
19981998
19991999 ssid = wpa_s->conf->ssid;
2000+
2001+ /* skip over ssids until we find next one */
2002+ if (cmd != NULL && os_strncmp(cmd, "LAST_ID=", 8) == 0) {
2003+ int last_id = atoi(cmd + 8);
2004+ if (last_id != -1) {
2005+ while (ssid != NULL && ssid->id <= last_id) {
2006+ ssid = ssid->next;
2007+ }
2008+ }
2009+ }
2010+
20002011 while (ssid) {
20012012 ret = os_snprintf(pos, end - pos, "%d\t%s",
20022013 ssid->id,
@@ -6836,9 +6847,12 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
68366847 } else if (os_strncmp(buf, "LOG_LEVEL", 9) == 0) {
68376848 reply_len = wpa_supplicant_ctrl_iface_log_level(
68386849 wpa_s, buf + 9, reply, reply_size);
6850+ } else if (os_strncmp(buf, "LIST_NETWORKS ", 14) == 0) {
6851+ reply_len = wpa_supplicant_ctrl_iface_list_networks(
6852+ wpa_s, buf + 14, reply, reply_size);
68396853 } else if (os_strcmp(buf, "LIST_NETWORKS") == 0) {
68406854 reply_len = wpa_supplicant_ctrl_iface_list_networks(
6841- wpa_s, reply, reply_size);
6855+ wpa_s, NULL, reply, reply_size);
68426856 } else if (os_strcmp(buf, "DISCONNECT") == 0) {
68436857 #ifdef CONFIG_SME
68446858 wpa_s->sme.prev_bssid_set = 0;
Show on old repository browser