Ejemplo n.º 1
0
Archivo: main.c Proyecto: imw/hapd
static void hostapd_global_deinit(const char *pid_file)
{
	int i;

	for (i = 0; wpa_drivers[i] && global.drv_priv; i++) {
		if (!global.drv_priv[i])
			continue;
		wpa_drivers[i]->global_deinit(global.drv_priv[i]);
	}
	os_free(global.drv_priv);
	global.drv_priv = NULL;

#ifdef EAP_SERVER_TNC
	tncs_global_deinit();
#endif /* EAP_SERVER_TNC */

	random_deinit();

	eloop_destroy();

#ifndef CONFIG_NATIVE_WINDOWS
	closelog();
#endif /* CONFIG_NATIVE_WINDOWS */

	eap_server_unregister_methods();
}
Ejemplo n.º 2
0
int tncs_global_init(void)
{
    struct tnc_if_imv *imv;

    tncs_global_data = os_zalloc(sizeof(*tncs_global_data));
    if (tncs_global_data == NULL)
        return -1;

    if (tncs_read_config(tncs_global_data) < 0) {
        wpa_printf(MSG_ERROR, "TNC: Failed to read TNC configuration");
        goto failed;
    }

    for (imv = tncs_global_data->imv; imv; imv = imv->next) {
        if (tncs_load_imv(imv)) {
            wpa_printf(MSG_ERROR, "TNC: Failed to load IMV '%s'",
                       imv->name);
            goto failed;
        }
    }

    return 0;

failed:
    tncs_global_deinit();
    return -1;
}
Ejemplo n.º 3
0
void hostapd_global_deinit(void)
{
#ifdef EAP_SERVER_TNC
	tncs_global_deinit();
#endif /* EAP_SERVER_TNC */

	eloop_destroy();

	/*eap_server_unregister_methods();*/
}
Ejemplo n.º 4
0
static void hostapd_global_deinit(const char *pid_file)
{
#ifdef EAP_SERVER_TNC
	tncs_global_deinit();
#endif /* EAP_SERVER_TNC */

	eloop_destroy();

#ifndef CONFIG_NATIVE_WINDOWS
	closelog();
#endif /* CONFIG_NATIVE_WINDOWS */

	eap_server_unregister_methods();

	os_daemonize_terminate(pid_file);
}