aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2006-06-26 02:45:53 -0400
committerDavid S. Miller <davem@davemloft.net>2006-06-26 02:45:53 -0400
commitbdd94789d2348e20d13c1d5e477c8cf830dd204b (patch)
tree14726d6f25d20e7e84f26e4c834e3187e017deaa /net/tipc
parent3546c7508d7e97fd855f8ac37afdd09622fa5ce1 (diff)
[TIPC]: Connected send now checks socket state when retrying congested send.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Per Liden <per.liden@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/socket.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 361dc342f377..9c834fc30112 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -565,15 +565,15 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
565 return -ERESTARTSYS; 565 return -ERESTARTSYS;
566 } 566 }
567 567
568 if (unlikely(sock->state != SS_CONNECTED)) {
569 if (sock->state == SS_DISCONNECTING)
570 res = -EPIPE;
571 else
572 res = -ENOTCONN;
573 goto exit;
574 }
575
576 do { 568 do {
569 if (unlikely(sock->state != SS_CONNECTED)) {
570 if (sock->state == SS_DISCONNECTING)
571 res = -EPIPE;
572 else
573 res = -ENOTCONN;
574 goto exit;
575 }
576
577 res = tipc_send(tsock->p->ref, m->msg_iovlen, m->msg_iov); 577 res = tipc_send(tsock->p->ref, m->msg_iovlen, m->msg_iov);
578 if (likely(res != -ELINKCONG)) { 578 if (likely(res != -ELINKCONG)) {
579exit: 579exit: