diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2012-02-19 18:16:34 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-02-19 18:16:34 +0200 |
commit | dddc70455be1c020a22aac9b6dea837ebb50f1df (patch) | |
tree | b4c58c137506a3ef03039af567e646437f0a47d9 | |
parent | a7a30b90e59e7c9f9db5ec5db6190a0fba4fc37e (diff) | |
download | external_wpa_supplicant_8_ti-dddc70455be1c020a22aac9b6dea837ebb50f1df.zip external_wpa_supplicant_8_ti-dddc70455be1c020a22aac9b6dea837ebb50f1df.tar.gz external_wpa_supplicant_8_ti-dddc70455be1c020a22aac9b6dea837ebb50f1df.tar.bz2 |
P2P: Add more debug on group idle timeout
This makes it easier to debug issues with P2P group idle timeout.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 121f602..b4aac1b 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -262,7 +262,8 @@ static void wpas_p2p_group_delete(struct wpa_supplicant *wpa_s) wpa_msg(wpa_s->parent, MSG_INFO, P2P_EVENT_GROUP_REMOVED "%s %s%s", wpa_s->ifname, gtype, reason); - eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL); + if (eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL) > 0) + wpa_printf(MSG_DEBUG, "P2P: Cancelled P2P group idle timeout"); if (ssid) wpas_notify_p2p_group_removed(wpa_s, ssid, gtype); @@ -3958,7 +3959,9 @@ static void wpas_p2p_set_group_idle_timeout(struct wpa_supplicant *wpa_s) { unsigned int timeout; - eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL); + if (eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL) > 0) + wpa_printf(MSG_DEBUG, "P2P: Cancelled P2P group idle timeout"); + if (wpa_s->current_ssid == NULL || !wpa_s->current_ssid->p2p_group) return; @@ -4211,8 +4214,9 @@ void wpas_p2p_notif_connected(struct wpa_supplicant *wpa_s) wpas_p2p_disable_cross_connect(wpa_s); else wpas_p2p_enable_cross_connect(wpa_s); - if (!wpa_s->ap_iface) - eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL); + if (!wpa_s->ap_iface && + eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL) > 0) + wpa_printf(MSG_DEBUG, "P2P: Cancelled P2P group idle timeout"); } |