]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Use start_ctrl_iface() from hostapd_add_iface()
authorJouni Malinen <j@w1.fi>
Sun, 3 Nov 2013 17:11:38 +0000 (19:11 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 3 Nov 2013 17:51:06 +0000 (19:51 +0200)
Better share the same function for initializing control interface from
the two possible paths that can add a new interface to hostapd.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/ap/hostapd.c

index fec79b34053070aacfbfa2b1487a70f559a15899..f99ee0c3d7ec31e323ccb696e8d73edc1f12e018 100644 (file)
@@ -1766,13 +1766,9 @@ int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf)
                goto fail;
        }
 
-       if (hapd_iface->interfaces &&
-           hapd_iface->interfaces->ctrl_iface_init &&
-           hapd_iface->interfaces->ctrl_iface_init(hapd_iface->bss[0])) {
-               wpa_printf(MSG_ERROR, "%s: Failed to setup control "
-                          "interface", __func__);
+       if (start_ctrl_iface(hapd_iface) < 0)
                goto fail;
-       }
+
        wpa_printf(MSG_INFO, "Add interface '%s'", conf->bss[0]->iface);
 
        return 0;