From: Eliad Peller Date: Sun, 6 Mar 2016 09:42:38 +0000 (+0200) Subject: hostapd: Use ifname of the current context in debug messages X-Git-Tag: hostap_2_6~734 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2940bf669ab53576bf1028012fcc538989f0df9b;p=thirdparty%2Fhostap.git hostapd: Use ifname of the current context in debug messages In case of multiple BSS configuration, return the current interface name, instead of the first one. Signed-off-by: Eliad Peller --- diff --git a/hostapd/main.c b/hostapd/main.c index 06aa4b235..25dc20b4d 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -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; }