From 5fb93d9dd3a1e5a59eda44e788b70e3eedca3986 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Thu, 21 Oct 2010 16:34:53 +0200 Subject: [PATCH] [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. --- .../owlps-listener/owlps-listenerd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/infrastructure-centred/owlps-listener/owlps-listenerd.c b/infrastructure-centred/owlps-listener/owlps-listenerd.c index e7d1378..e253bff 100644 --- a/infrastructure-centred/owlps-listener/owlps-listenerd.c +++ b/infrastructure-centred/owlps-listener/owlps-listenerd.c @@ -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