Skip to content
Browse files

Update priority list after changing priority

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
  • Loading branch information...
1 parent 80e9d69 commit 3936ce8fac598431199814539e806c4eacabdfb7 Dmitry Shmidt committed Feb 24, 2010
Showing with 6 additions and 2 deletions.
  1. +1 −1 config.c
  2. +1 −1 config.h
  3. +4 −0 ctrl_iface.c
View
2 config.c
@@ -1295,7 +1295,7 @@ int wpa_config_add_prio_network(struct wpa_config *config,
* configuration when a network is being added or removed. This is also called
* if a priority for a network is changed.
*/
-static int wpa_config_update_prio_list(struct wpa_config *config)
+int wpa_config_update_prio_list(struct wpa_config *config)
{
struct wpa_ssid *ssid;
int ret = 0;
View
2 config.h
@@ -288,7 +288,7 @@ char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var);
void wpa_config_update_psk(struct wpa_ssid *ssid);
int wpa_config_add_prio_network(struct wpa_config *config,
struct wpa_ssid *ssid);
-
+int wpa_config_update_prio_list(struct wpa_config *config);
const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
const char *name);
void wpa_config_set_blob(struct wpa_config *config,
View
4 ctrl_iface.c
@@ -796,6 +796,10 @@ static int wpa_supplicant_ctrl_iface_set_network(
wpa_printf(MSG_DEBUG, "CTRL_IFACE: Failed to set network "
"variable '%s'", name);
return -1;
+ } else {
+ if (os_strcmp(name, "priority") == 0) {
+ wpa_config_update_prio_list(wpa_s->conf);
+ }
}
if (wpa_s->current_ssid == ssid) {

0 comments on commit 3936ce8

Please sign in to comment.
Something went wrong with that request. Please try again.