[Listener] Get MAC and IP, then launch threads

Operation order is better that way, because autocalibrate_hello() needs
to know MAC and IP addresses of the AP.
This commit is contained in:
Matteo Cypriani 2010-10-21 16:34:53 +02:00
parent c17af1cf95
commit 5fb93d9dd3
1 changed files with 7 additions and 7 deletions

View File

@ -88,6 +88,13 @@ int main(int argc, char *argv[])
action.sa_handler = sigterm_handler ;
sigaction(SIGTERM, &action, NULL) ;
get_mac_addr(GET_WIFI_IFACE(), my_mac) ;
mac_string = mac_bytes_to_string(my_mac) ;
printf("My MAC address is: %s\n", mac_string) ;
free(mac_string) ;
get_ip_addr(GET_WIFI_IFACE(), my_ip) ;
printf("My IP address is: %s\n", my_ip) ;
#ifdef USE_PTHREAD
/* Set up threads */
if (GET_KEEP_MONITOR())
@ -102,13 +109,6 @@ int main(int argc, char *argv[])
}
#endif // USE_PTHREAD
get_mac_addr(GET_WIFI_IFACE(), my_mac) ;
mac_string = mac_bytes_to_string(my_mac) ;
printf("My MAC address is: %s\n", mac_string) ;
free(mac_string) ;
get_ip_addr(GET_WIFI_IFACE(), my_ip) ;
printf("My IP address is: %s\n", my_ip) ;
ret = capture() ; // Capture loop
#ifdef USE_CONFIG_FILE