From 25e011b5cff3f1a1d145f4a45609a2fcb41a9bdc Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Mar 2012 12:41:15 -0600 Subject: [PATCH] Revert "wifi: fix entering an endless loop" This reverts commit 84403ab84a0b5a0ce34594e5203b983da855ed0d. It appears we want to loop until one of the callback says we're done, while this patch would exit too early (possibly before we'd received a reply) since nl_recvmsgs() returns 0 on success. What we really want do do here is wait for one of the callbacks we've registered to tell us that they've successfully handled the message and gotten a reply. --- src/wifi/wifi-utils-nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wifi/wifi-utils-nl80211.c b/src/wifi/wifi-utils-nl80211.c index e6f9a4f05b..e46bbc50a9 100644 --- a/src/wifi/wifi-utils-nl80211.c +++ b/src/wifi/wifi-utils-nl80211.c @@ -127,7 +127,7 @@ _nl80211_send_and_recv (struct nl_sock *nl_sock, nl_cb_set (cb, NL_CB_VALID, NL_CB_CUSTOM, valid_handler, valid_data); while (err > 0) - err = nl_recvmsgs (nl_sock, cb); + nl_recvmsgs (nl_sock, cb); out: nl_cb_put (cb);