]> git.decadent.org.uk Git - ap-utils.git/blobdiff - ap-gl/stations.c
Imported Upstream version 1.4.2~pre2~a
[ap-utils.git] / ap-gl / stations.c
index 7e596982a5dd7e8ef3119d1231e1ffe53fe07a87..63fe84a995f276b93fcf470b168575cfe0723c5a 100644 (file)
@@ -36,6 +36,16 @@ extern short ap_type;
 
 void stations()
 {
+    char StasNum[] = {
+       0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x02, 0x05, 0x01, 0x00
+    };
+    char StasMac[] = {
+       0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x02, 0x05, 0x02, 0x00
+    };
+    char bridgeOperationalMode[] = {
+         0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x01, 0x04, 0x01, 0x00
+    };
+    
     struct AssociatedSTAsInfo {
        unsigned short Num;
        unsigned char MacAddress[6];
@@ -47,20 +57,7 @@ void stations()
        unsigned char IP[4];
        unsigned char Reserved[2];
     } *mac = NULL, get;
-    char StasNum[] =
-       { 0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x02, 0x05, 0x01,
-       0x00
-    };
-
-    char StasMac[] =
-       { 0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x02, 0x05, 0x02,
-       0x00
-    };
 
-    char bridgeOperationalMode[] = {
-         0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A, 0x01, 0x01, 0x04, 0x01, 0x00
-    };
-    
     struct MacListStat *first = NULL, *curr = NULL;
     char message[1024];
     int mac_num, begin, end, total_mac;
@@ -80,15 +77,14 @@ void stations()
     }
 
     if (*(varbinds[0].value) == 3) {
-         mvwaddstr(main_sub, 3, 1, _("AP now in AP Client Mode and don't has any associated stations"));
-         print_help(ANY_KEY);
-         wrefresh(main_sub);
-        getch();
-         goto exit;
-     }
+       mvwaddstr(main_sub, 3, 1, _("AP is currently in AP Client Mode => "
+           "no associated STAtions."));
+       print_help(ANY_KEY);
+       wrefresh(main_sub);
+       getch();
+       goto exit;
+    }
 
-                                   
-    
     varbinds[0].oid = StasNum;
     varbinds[0].len_oid = sizeof(StasNum);
     varbinds[0].value = StasNum;
@@ -106,7 +102,7 @@ void stations()
 
     sprintf(message, "%s: %d", STAS, total_mac);
     print_title(message);
-    mvwaddstr(main_sub, 0, 1, _("#  MAC          LQ    RSSI   Status Port IP"));
+    mvwaddstr(main_sub, 0, 1, _("#     MAC       LQ    RSSI   Status Port IP"));
     noecho();
 
     while (mac_num <= total_mac) {