X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ap-gl%2Fap-gl.c;fp=ap-gl%2Fap-gl.c;h=610d949c43635e6b30e696942c7bd5fccdd736cf;hb=db905ff22705494136f504425cf0c75bb94cb81c;hp=8c765141d859b273aa070fef8b44bb3820d51fd0;hpb=67fc54773e1504698e80c9cb83977bde32665350;p=ap-utils.git diff --git a/ap-gl/ap-gl.c b/ap-gl/ap-gl.c index 8c76514..610d949 100644 --- a/ap-gl/ap-gl.c +++ b/ap-gl/ap-gl.c @@ -28,18 +28,12 @@ #include "ap-utils.h" WINDOW *win_for_menu, *sub_for_menu, *win_for_help, *main_win, *main_sub; -short ap_type; char *community, *name; -int sockfd, atmel410_filter=1; +int sockfd, atmel410_filter = 1, wait_mode = WAIT_FOREVER; struct in_addr ap_ip; - -char *ap_types[3] = { - "ATMEL_PRISM", - "NWN", - "ATMEL12350" -}; - char *prog_title = "Wireless AP Configurator for GlobalSun"; +char set_oeminfo_allowed = 0; +extern char *ap_types[]; void config_menu() { @@ -56,35 +50,36 @@ void config_menu() {0, 0, NULL, 0} }; + set_oeminfo_allowed++; uni_menu(umenu_atmel, sizeof(umenu_atmel) / sizeof(umenu_atmel[0])); + set_oeminfo_allowed--; } void command_menu() { struct umitems command_umenu_atmel[] = { - {_("Upload"), _("Make current configuration active"), upload, 0}, - {_("Defaults"), _("Restore factory default settings"), defaults, - 0}, + {_("Upload"), _("Activate current configuration"), upload, 0}, + {_("Defaults"), _("Restore factory default settings"), defaults, 0}, {_("Reset"), - _("Reset AP. All not uploaded configuration will be lost"), - reset, 0}, + _("Reset AP. All not uploaded configuration will be lost"), reset, 0}, {_("TestMode"), _("Put Access Point in test mode"), test, 0}, {"..", MAIN_MENU, NULL, 0}, {0, 0, NULL, 0} }; + + ap_types[1] = "ATMEL_PRISM"; + uni_menu(command_umenu_atmel, sizeof(command_umenu_atmel) / sizeof(command_umenu_atmel[0])); } - void stat_menu() { struct umitems umenu_atmel[] = { {_("SysInfo"), MENU_SYSINFO, atmel_sysinfo, 0}, {_("Ethernet"), _("Get ethernet port statistics"), EthStat, 0}, {_("Wireless"), MENU_WIRELESS, WirelessStat, 0}, - {_("Stations"), MENU_STAS, stations, - 0}, + {_("Stations"), MENU_STAS, atmel_stations, 0}, {_("KnownAPs"), _("Get info about known Access Points"), APs, 0}, {"..", MAIN_MENU, NULL, 0}, {0, 0, NULL, 0} @@ -95,8 +90,8 @@ void stat_menu() void _auth() { - if(get_opts() == 0) - connect_options((unsigned long) NULL, ATMEL410+1); + if (get_opts() == 0) + connect_options((unsigned long) NULL, ATMEL410+1); } void main_menu() @@ -124,6 +119,7 @@ int main( /*int argc, char **argv */ ) WINDOW *win_for_title; char message[100]; + ap_types[0]="ATMEL_PRISM"; #ifdef HAVE_GETTEXT /* locale support init */ @@ -202,10 +198,9 @@ int main( /*int argc, char **argv */ ) wrefresh(main_win); about(); - if (get_opts() == 0) { - connect_options((unsigned long) NULL, ATMEL410+1); + if (get_opts() == 0) + connect_options((unsigned long) NULL, ATMEL410+1); - } while (1) main_menu();