]> git.decadent.org.uk Git - ap-utils.git/blobdiff - src/ap-config.c
Imported Upstream version 1.5
[ap-utils.git] / src / ap-config.c
index e17926d75339ca318975b88d994cc50a957e9348..fa82c8c2faccc7ecbb9165c20d4e9cc62dceb1cb 100644 (file)
 #include <sys/ioctl.h>
 #include "ap-utils.h"
 
+extern short ap_type;
+extern int snmp_quit_by_keypress;
+
 WINDOW *win_for_menu, *sub_for_menu, *win_for_help, *main_win, *main_sub;
 char *community;
-int sockfd, atmel410_filter = 0, wait_mode = WAIT_FOREVER;
+int atmel410_filter = 0, wait_mode = WAIT_FOREVER;
 struct in_addr ap_ip;
 char *prog_title = "Wireless Access Point Configurator";
 char set_oeminfo_allowed = 0;
-extern short ap_type;
 
 void config_menu()
 {
@@ -151,8 +153,9 @@ void main_menu()
         command_menu, 1},
        {_("Connect"), MENU_CONNECT, _auth, 0},
        {_("Search"), MENU_SEARCH, ap_search, 0},
-       {_("About"), MENU_ABOUT, about, 0},
+       {_("Polling"), MENU_POLLING, polling_interval, 0},
        {_("Shell"), MENU_SHELL, exit_shell, 0},
+       {_("About"), MENU_ABOUT, about, 0},
        {_("Exit"), MENU_EXIT, exit_program, 0},
        {0, 0, NULL, 0}
     };
@@ -184,7 +187,7 @@ int main( /*int argc, char **argv */ )
        init_pair (COLOR_GREEN, COLOR_GREEN, COLOR_BLACK);
        init_pair (COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK);
        init_pair (COLOR_BLUE, COLOR_BLUE, COLOR_BLACK);
-       init_pair (COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK );
+       init_pair (COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK);
        init_pair (COLOR_CYAN, COLOR_CYAN, COLOR_BLACK);
 
        init_pair(11, COLOR_BLACK, COLOR_CYAN);
@@ -199,6 +202,7 @@ int main( /*int argc, char **argv */ )
     scrollok(stdscr, TRUE);
     idlok(stdscr, TRUE);
     keypad(stdscr, TRUE);
+    snmp_quit_by_keypress = 1;
     refresh();
 
 /* draw help win */
@@ -263,4 +267,3 @@ int main( /*int argc, char **argv */ )
 /* Not reachable */
     return 0;
 }
-