login
Header Space

 
 

[PATCH 5/7 net-2.6.26] [TIPC]: Add error check to detect non-blocking form of connect()

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <netdev@...>, <allan.stephens@...>
Date: Monday, April 14, 2008 - 5:16 pm

This patch causes TIPC to return an error indication if the non-
blocking form of connect() is requested (which TIPC does not yet
support).

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
---
 net/tipc/socket.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 4c83aba..348e4ff 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1260,6 +1260,11 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
    if (sock->state == SS_READY)
 	   return -EOPNOTSUPP;
 
+   /* For now, TIPC does not support the non-blocking form of connect() */
+
+   if (flags & O_NONBLOCK)
+	   return -EWOULDBLOCK;
+
    /* Issue Posix-compliant error code if socket is in the wrong state */
 
    if (sock->state == SS_LISTENING)
-- 
1.5.3.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 5/7 net-2.6.26] [TIPC]: Add error check to detect non..., Allan Stephens, (Mon Apr 14, 5:16 pm)
speck-geostationary