diff options
author | Thomas Graf <tgraf@suug.ch> | 2013-04-02 09:58:18 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2013-04-02 09:58:18 (GMT) |
commit | 375a6294a41e003f873821a01d947f0ecfaf76d4 (patch) | |
tree | 632394eb6c380e9f75c4731049a5edec931d0a71 | |
parent | df66b0f267af636848d7f0301d3f5863c58fb313 (diff) | |
download | libnl-375a6294a41e003f873821a01d947f0ecfaf76d4.zip libnl-375a6294a41e003f873821a01d947f0ecfaf76d4.tar.gz libnl-375a6294a41e003f873821a01d947f0ecfaf76d4.tar.bz2 |
nl: Return -NLE_AGAIN if non-blocking socket would block
Previously 0 was returned which gave the caller no chance of detecting
when a non-blocking socket would block. If a caller intends to never
see an error message it should utilize poll()/select() to only read
when the socket has pending data or information.
Reported-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
-rw-r--r-- | lib/nl.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -627,11 +627,6 @@ retry: NL_DBG(3, "recvmsg() returned EINTR, retrying\n"); goto retry; } - if (errno == EAGAIN || errno == EWOULDBLOCK) { - NL_DBG(3, "recvmsg() returned EAGAIN||EWOULDBLOCK, aborting\n"); - retval = 0; - goto abort; - } retval = -nl_syserr2nlerr(errno); goto abort; } |