From: Yu Jiung Date: Mon, 4 Jan 2016 02:12:17 +0000 (+0900) Subject: [wifi-direct-manager]Fix compile error for 64bit build X-Git-Tag: submit/tizen_common/20151229.154718~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F56049%2F1;p=platform%2Fcore%2Fconnectivity%2Fwifi-direct-manager.git [wifi-direct-manager]Fix compile error for 64bit build Change-Id: I7156791e7f16ec27ebb7081ed7cb83341f35fc9a --- diff --git a/packaging/wifi-direct-manager.spec b/packaging/wifi-direct-manager.spec index 67cb31e..92d80ca 100755 --- a/packaging/wifi-direct-manager.spec +++ b/packaging/wifi-direct-manager.spec @@ -1,6 +1,6 @@ Name: wifi-direct-manager Summary: Wi-Fi Direct manger -Version: 1.2.106 +Version: 1.2.107 Release: 1 Group: Network & Connectivity/Wireless License: Apache-2.0 diff --git a/plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c b/plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c index c08e2ac..f815394 100755 --- a/plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c +++ b/plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c @@ -838,17 +838,23 @@ static int _connect_to_supplicant(char *ifname, ws_sock_data_s **sock_data) static gboolean _remove_event_source(gpointer data) { __WDP_LOG_FUNC_ENTER__; - int source_id = (int) data; + ws_sock_data_s *sock_data = NULL; int res = 0; - if (source_id < 0) { - WDP_LOGE("Invalid source ID [%d]", source_id); + sock_data = (ws_sock_data_s *) data; + if (sock_data == NULL) { + WDP_LOGE("Invalid sock_data"); return FALSE; } - res = g_source_remove(source_id); + if (sock_data->gsource < 0) { + WDP_LOGE("Invalid source ID [%d]", sock_data->gsource); + return FALSE; + } + + res = g_source_remove(sock_data->gsource); if (!res) { - WDP_LOGE("Failed to remove GSource(%d)", source_id); + WDP_LOGE("Failed to remove GSource(%d)", sock_data->gsource); return FALSE; } WDP_LOGD("Succeeded to remove GSource"); @@ -887,7 +893,7 @@ static int _disconnect_from_supplicant(char *ifname, ws_sock_data_s *sock_data) } if (sock_data->gsource > 0) - g_idle_add(_remove_event_source, (gpointer) sock_data->gsource); + g_idle_add(_remove_event_source, (gpointer) sock_data); sock_data->gsource = 0; // close control interface