Move hostapd_set_drv_ieee8021x() into ap_drv_ops
[libeap.git] / hostapd / main.c
index 77f2050..9c0b7e2 100644 (file)
@@ -25,6 +25,7 @@
 #include "eap_server/tncs.h"
 #include "hostapd.h"
 #include "config.h"
+#include "config_file.h"
 
 
 extern int wpa_debug_level;
@@ -178,6 +179,7 @@ static struct hostapd_iface * hostapd_init(const char *config_file)
        if (hapd_iface == NULL)
                goto fail;
 
+       hapd_iface->config_read_cb = hostapd_config_read;
        hapd_iface->config_fname = os_strdup(config_file);
        if (hapd_iface->config_fname == NULL)
                goto fail;
@@ -400,6 +402,9 @@ int main(int argc, char *argv[])
        int c, debug = 0, daemonize = 0;
        char *pid_file = NULL;
 
+       if (os_program_init())
+               return -1;
+
        for (;;) {
                c = getopt(argc, argv, "BdhKP:tv");
                if (c < 0)
@@ -474,5 +479,7 @@ int main(int argc, char *argv[])
        hostapd_global_deinit(pid_file);
        os_free(pid_file);
 
+       os_program_deinit();
+
        return ret;
 }