mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[TIPC]: Add error check to detect non-blocking form of connect()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1819b83718
commit
4934c69a38
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue