hostapd: Use ifname of the current context in debug messages
authorEliad Peller <eliad@wizery.com>
Sun, 6 Mar 2016 09:42:38 +0000 (11:42 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 6 Mar 2016 18:01:15 +0000 (20:01 +0200)
In case of multiple BSS configuration, return the current interface
name, instead of the first one.

Signed-off-by: Eliad Peller <eliad@wizery.com>
hostapd/main.c

index 06aa4b2..25dc20b 100644 (file)
@@ -474,9 +474,8 @@ static void usage(void)
 static const char * hostapd_msg_ifname_cb(void *ctx)
 {
        struct hostapd_data *hapd = ctx;
-       if (hapd && hapd->iconf && hapd->iconf->bss &&
-           hapd->iconf->num_bss > 0 && hapd->iconf->bss[0])
-               return hapd->iconf->bss[0]->iface;
+       if (hapd && hapd->conf)
+               return hapd->conf->iface;
        return NULL;
 }