[PATCH] Handle -NLE_AGAIN in nl_cache_mngr_data_ready

Andrew Collins bsderandrew at gmail.com
Mon Jun 17 17:58:43 EDT 2013


Since commit "nl: Return -NLE_AGAIN if non-blocking socket would block",
nl_cache_mngr_data_ready returns -NLE_AGAIN to callers on non-blocking sockets.
Change it to consider -NLE_AGAIN as a non-error case as it is expected behavior
with the nl_recv changes.
---
 lib/cache_mngr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
index f8a65e3..7fb1ed0 100644
--- a/lib/cache_mngr.c
+++ b/lib/cache_mngr.c
@@ -435,7 +435,7 @@ int nl_cache_mngr_data_ready(struct nl_cache_mngr *mngr)
 	}
 
 	nl_cb_put(cb);
-	if (err < 0)
+	if (err < 0 && err != -NLE_AGAIN)
 		return err;
 
 	return nread;
-- 
1.8.1.4




More information about the libnl mailing list