当前位置: 首页>>代码示例>>C++>>正文


C++ eloop_terminate函数代码示例

本文整理汇总了C++中eloop_terminate函数的典型用法代码示例。如果您正苦于以下问题:C++ eloop_terminate函数的具体用法?C++ eloop_terminate怎么用?C++ eloop_terminate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了eloop_terminate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: hostapd_cli_cmd_quit

static int hostapd_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
	hostapd_cli_quit = 1;
	if (interactive)
		eloop_terminate();
	return 0;
}
开发者ID:cococorp,项目名称:hostap-upstream,代码行数:7,代码来源:hostapd_cli.c

示例2: wpa_supplicant_event_interface_status

static void
wpa_supplicant_event_interface_status(struct wpa_supplicant *wpa_s,
				      union wpa_event_data *data)
{
	if (os_strcmp(wpa_s->ifname, data->interface_status.ifname) != 0)
		return;

	switch (data->interface_status.ievent) {
	case EVENT_INTERFACE_ADDED:
		if (!wpa_s->interface_removed)
			break;
		wpa_s->interface_removed = 0;
		wpa_printf(MSG_DEBUG, "Configured interface was added.");
		if (wpa_supplicant_driver_init(wpa_s) < 0) {
			wpa_printf(MSG_INFO, "Failed to initialize the driver "
				   "after interface was added.");
		}
		break;
	case EVENT_INTERFACE_REMOVED:
		wpa_printf(MSG_DEBUG, "Configured interface was removed.");
		wpa_s->interface_removed = 1;
		wpa_supplicant_mark_disassoc(wpa_s);
		l2_packet_deinit(wpa_s->l2);
		wpa_s->l2 = NULL;
#ifdef CONFIG_TERMINATE_ONLASTIF
		/* check if last interface */
		if (!any_interfaces(wpa_s->global->ifaces))
			eloop_terminate();
#endif /* CONFIG_TERMINATE_ONLASTIF */
		break;
	}
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:32,代码来源:events.c

示例3: eapol_test_terminate

static void eapol_test_terminate(int sig, void *eloop_ctx,
				 void *signal_ctx)
{
	struct wpa_supplicant *wpa_s = eloop_ctx;
	wpa_msg(wpa_s, MSG_INFO, "Signal %d received - terminating", sig);
	eloop_terminate();
}
开发者ID:LucidOne,项目名称:Rovio,代码行数:7,代码来源:eapol_test.c

示例4: http_req

static void http_req(void *ctx, struct http_request *req)
{
	struct browser_data *data = ctx;
	struct wpabuf *resp;
	const char *url;
	int done = 0;

	url = http_request_get_uri(req);
	wpa_printf(MSG_INFO, "Browser response received: %s", url);

	if (os_strcmp(url, "/") == 0) {
		data->success = 1;
		done = 1;
	} else if (os_strncmp(url, "/osu/", 5) == 0) {
		data->success = atoi(url + 5);
		done = 1;
	}

	resp = wpabuf_alloc(1);
	if (resp == NULL) {
		http_request_deinit(req);
		if (done)
			eloop_terminate();
		return;
	}

	if (done) {
		eloop_cancel_timeout(browser_timeout, NULL, NULL);
		eloop_register_timeout(0, 500000, browser_timeout, &data, NULL);
	}

	http_request_send_and_deinit(req, resp);
}
开发者ID:9A9A,项目名称:wpa_supplicant-fork,代码行数:33,代码来源:browser-android.c

示例5: eapol_test_timeout

static void eapol_test_timeout(void *eloop_ctx, void *timeout_ctx)
{
	struct wpa_supplicant *wpa_s = eloop_ctx;
	printf("EAPOL test timed out\n");
	wpa_s->auth_timed_out = 1;
	eloop_terminate();
}
开发者ID:OPSF,项目名称:uClinux,代码行数:7,代码来源:eapol_test.c

示例6: Handle_term

void Handle_term(int sig, void *eloop_ctx, void *signal_ctx)
{
	//FILE    *f;
	//char    buf[256], *pos;
	//int     line = 0, i;
    //int     filesize,cur = 0;
    //char    *ini_buffer;             /* storage area for .INI file */

	DBGPRINT(RT_DEBUG_ERROR,"Signal %d received - terminating\n", sig);
	eloop_terminate();
}
开发者ID:houzhenggang,项目名称:mt7688_mips_ecos,代码行数:11,代码来源:rtdot1x.c

示例7: eapol_sm_cb

static void eapol_sm_cb(struct eapol_sm *eapol, int success, void *ctx)
{
	struct eapol_test_data *e = ctx;
	printf("eapol_sm_cb: success=%d\n", success);
	e->eapol_test_num_reauths--;
	if (e->eapol_test_num_reauths < 0)
		eloop_terminate();
	else {
		eapol_test_compare_pmk(e);
		eloop_register_timeout(0, 100000, eapol_sm_reauth, e, NULL);
	}
}
开发者ID:MultiNet-80211,项目名称:Hostapd,代码行数:12,代码来源:eapol_test.c

示例8: eapol_sm_cb

static void eapol_sm_cb(struct eapol_sm *eapol, enum eapol_supp_result result,
			void *ctx)
{
	struct eapol_test_data *e = ctx;
	printf("eapol_sm_cb: result=%d\n", result);
	e->eapol_test_num_reauths--;
	if (e->eapol_test_num_reauths < 0)
		eloop_terminate();
	else {
		eapol_test_compare_pmk(e);
		eloop_register_timeout(0, 100000, eapol_sm_reauth, e, NULL);
	}
}
开发者ID:Hansenq,项目名称:wifi-goes-to-town,代码行数:13,代码来源:eapol_test.c

示例9: handle_reload_iface

int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
{

/*    if (hostapd_reload_config(iface) < 0) {
		wpa_printf(MSG_WARNING, "Failed to read new configuration "
			   "file - continuing with old.");
     }
*/
    reloading = 1;
    eloop_terminate();
    return 0;

}
开发者ID:springware,项目名称:92u10,代码行数:13,代码来源:main.c

示例10: wpa_supplicant_global_ctrl_iface_process

char * wpa_supplicant_global_ctrl_iface_process(struct wpa_global *global,
						char *buf, size_t *resp_len)
{
	char *reply;
	const int reply_size = 4096;
	int reply_len;

    if (os_strcmp(buf, "PING") != 0) {
	    wpa_hexdump_ascii(MSG_DEBUG, "RX global ctrl_iface",
			  (const u8 *) buf, os_strlen(buf));
    }

	reply = os_malloc(reply_size);
	if (reply == NULL) {
		*resp_len = 1;
		return NULL;
	}

	os_memcpy(reply, "OK\n", 3);
	reply_len = 3;

	if (os_strcmp(buf, "PING") == 0) {
		os_memcpy(reply, "PONG\n", 5);
		reply_len = 5;
	} else if (os_strncmp(buf, "INTERFACE_ADD ", 14) == 0) {
		if (wpa_supplicant_global_iface_add(global, buf + 14))
			reply_len = -1;
	} else if (os_strncmp(buf, "INTERFACE_REMOVE ", 17) == 0) {
		if (wpa_supplicant_global_iface_remove(global, buf + 17))
			reply_len = -1;
	} else if (os_strcmp(buf, "INTERFACE_LIST") == 0) {
		reply_len = wpa_supplicant_global_iface_list(
			global, reply, reply_size);
	} else if (os_strcmp(buf, "INTERFACES") == 0) {
		reply_len = wpa_supplicant_global_iface_interfaces(
			global, reply, reply_size);
	} else if (os_strcmp(buf, "TERMINATE") == 0) {
		eloop_terminate();
	} else {
		os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
		reply_len = 16;
	}

	if (reply_len < 0) {
		os_memcpy(reply, "FAIL\n", 5);
		reply_len = 5;
	}

	*resp_len = reply_len;
	return reply;
}
开发者ID:abo-hob,项目名称:android-wpa_supplicant,代码行数:51,代码来源:ctrl_iface.c

示例11: DOT1X_Stop

int DOT1X_Stop(void)
{
	int i;

	DBGPRINT(RT_DEBUG_ERROR,"DOT1X_Stop\n");
	if(interfaces.rtapd != NULL)
	{
                eloop_terminate();
                cyg_thread_delay(300);
                cyg_thread_delete(dot1x_thread);
	}
	else
		DBGPRINT(RT_DEBUG_ERROR,"1x daemon not running interfaces.rtapd == NULL\n");
}
开发者ID:houzhenggang,项目名称:mt7688_mips_ecos,代码行数:14,代码来源:rtdot1x.c

示例12: receive_auth

/* Process the RADIUS frames from Authentication Server */
static RadiusRxResult receive_auth(struct radius_msg *msg,
                                   struct radius_msg *req,
                                   const u8 *shared_secret,
                                   size_t shared_secret_len,
                                   void *data)
{
    /* struct radius_ctx *ctx = data; */
    printf("Received RADIUS Authentication message; code=%d\n",
           radius_msg_get_hdr(msg)->code);

    /* We're done for this example, so request eloop to terminate. */
    eloop_terminate();

    return RADIUS_RX_PROCESSED;
}
开发者ID:avchinch,项目名称:hostap-1,代码行数:16,代码来源:radius_example.c

示例13: check_sconf_integrity

static void check_sconf_integrity(struct smartconfig *sc)
{
	int i, count = 0;

	int len = (sc->ssid_len > sc->psk_len ? sc->ssid_len : sc->psk_len);
	if (len > 0) {

		for (i = 0; i < len; i++)
			if (sc->slm[i + 4].flag)
				count++;

		if (count == len) {
			eloop_terminate();
		}
	}
}
开发者ID:jolin90,项目名称:smartconfig,代码行数:16,代码来源:pcap.c

示例14: service_ctrl_handler

static void WINAPI service_ctrl_handler(DWORD control_code)
{
        switch (control_code) {
        case SERVICE_CONTROL_INTERROGATE:
                break;
        case SERVICE_CONTROL_SHUTDOWN:
        case SERVICE_CONTROL_STOP:
                svc_status.dwCurrentState = SERVICE_STOP_PENDING;
                svc_status.dwWaitHint = 2000;
                eloop_terminate();
                SetEvent(kill_svc);
                break;
        }

        if (!SetServiceStatus(svc_status_handle, &svc_status)) {
                printf("SetServiceStatus() failed: %d\n",
                       (int) GetLastError());
        }
}
开发者ID:tigerjibo,项目名称:wpa_suppliant_with_openssl,代码行数:19,代码来源:main_winsvc.c

示例15: handle_term

/**
 * handle_term - SIGINT and SIGTERM handler to terminate hostapd process
 */
static void handle_term(int sig, void *signal_ctx)
{
	wpa_printf(MSG_DEBUG, "Signal %d received - terminating", sig);
	eloop_terminate();
}
开发者ID:imw,项目名称:hapd,代码行数:8,代码来源:main.c


注:本文中的eloop_terminate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。