Browse Source

add a priority override arg to set_essid so that 'reconfigure the wireless

network' asks all possible questions at prio high

r15514
tags/0.64
Joshua Kwan 17 years ago
parent
commit
45d0da738f
6 changed files with 8 additions and 8 deletions
  1. +1
    -1
      dhcp.c
  2. +1
    -1
      netcfg-dhcp.c
  3. +1
    -1
      netcfg-static.c
  4. +1
    -1
      netcfg.c
  5. +1
    -1
      netcfg.h
  6. +3
    -3
      wireless.c

+ 1
- 1
dhcp.c View File

@@ -298,7 +298,7 @@ int netcfg_activate_dhcp (struct debconfclient *client)
switch (wifistate)
{
case ESSID:
state = ( netcfg_wireless_set_essid(client, interface) == GO_BACK ) ?
state = ( netcfg_wireless_set_essid(client, interface, "high") == GO_BACK ) ?
ABORT : WEP;
break;



+ 1
- 1
netcfg-dhcp.c View File

@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
break;

case WCONFIG_ESSID:
if (netcfg_wireless_set_essid (client, interface))
if (netcfg_wireless_set_essid (client, interface, NULL))
state = BACKUP;
else
state = WCONFIG_WEP;


+ 1
- 1
netcfg-static.c View File

@@ -79,7 +79,7 @@ int main(int argc, char** argv)
break;

case WCONFIG_ESSID:
if (netcfg_wireless_set_essid (client, interface))
if (netcfg_wireless_set_essid (client, interface, NULL))
state = BACKUP;
else
state = WCONFIG_WEP;


+ 1
- 1
netcfg.c View File

@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
break;

case WCONFIG_ESSID:
if (netcfg_wireless_set_essid (client, interface) == GO_BACK)
if (netcfg_wireless_set_essid (client, interface, NULL) == GO_BACK)
state = BACKUP;
else
state = WCONFIG_WEP;


+ 1
- 1
netcfg.h View File

@@ -93,7 +93,7 @@ void netcfg_nameservers_to_array(char *nameservers, struct in_addr array[]);

extern int is_wireless_iface (const char* iface);

extern int netcfg_wireless_set_essid (struct debconfclient *client, char* iface);
extern int netcfg_wireless_set_essid (struct debconfclient *client, char* iface, char* priority);
extern int netcfg_wireless_set_wep (struct debconfclient *client, char* iface);

extern int iface_is_hotpluggable(const char *iface);


+ 3
- 3
wireless.c View File

@@ -25,7 +25,7 @@ int is_wireless_iface (const char* iface)
return (iw_get_basic_config (wfd, (char*)iface, &wc) == 0);
}

int netcfg_wireless_set_essid (struct debconfclient * client, char *iface)
int netcfg_wireless_set_essid (struct debconfclient * client, char *iface, char* priority)
{
int ret, couldnt_associate = 0;
wireless_config wconf;
@@ -36,7 +36,7 @@ int netcfg_wireless_set_essid (struct debconfclient * client, char *iface)
debconf_subst(client, "netcfg/wireless_essid", "iface", iface);
debconf_subst(client, "netcfg/wireless_adhoc_managed", "iface", iface);

debconf_input(client, "low", "netcfg/wireless_adhoc_managed");
debconf_input(client, priority ? priority : "low", "netcfg/wireless_adhoc_managed");

if (debconf_go(client) == 30)
return GO_BACK;
@@ -49,7 +49,7 @@ int netcfg_wireless_set_essid (struct debconfclient * client, char *iface)
wconf.has_mode = 1;
wconf.mode = mode;

debconf_input(client, "low", "netcfg/wireless_essid");
debconf_input(client, priority ? priority : "low", "netcfg/wireless_essid");

if (debconf_go(client) == 30)
return GO_BACK;


Loading…
Cancel
Save