Ejemplo n.º 1
0
Archivo: main.c Proyecto: imw/hapd
static int hostapd_global_run(struct hapd_interfaces *ifaces, int daemonize,
			      const char *pid_file)
{
#ifdef EAP_SERVER_TNC
	int tnc = 0;
	size_t i, k;

	for (i = 0; !tnc && i < ifaces->count; i++) {
		for (k = 0; k < ifaces->iface[i]->num_bss; k++) {
			if (ifaces->iface[i]->bss[0]->conf->tnc) {
				tnc++;
				break;
			}
		}
	}

	if (tnc && tncs_global_init() < 0) {
		wpa_printf(MSG_ERROR, "Failed to initialize TNCS");
		return -1;
	}
#endif /* EAP_SERVER_TNC */

	eloop_run();

	return 0;
}
Ejemplo n.º 2
0
int hostapd_global_run(struct hostapd_iface *ifaces)
{
#ifdef EAP_SERVER_TNC
	int tnc = 0;
	size_t i, k;

	for (k = 0; k < ifaces->iface[i]->num_bss; k++) {
		if (ifaces->iface[i]->bss[0]->conf->tnc) {
			tnc++;
			break;
		}
	}

	if (tnc && tncs_global_init() < 0) {
		wpa_printf(MSG_ERROR, "Failed to initialize TNCS");
		return -1;
	}
#endif /* EAP_SERVER_TNC */

	eloop_run();

	return 0;
}