]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[TIPC]: Connected send now checks socket state when retrying congested send.
authorAllan Stephens <allan.stephens@windriver.com>
Mon, 26 Jun 2006 06:45:53 +0000 (23:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Jun 2006 06:45:53 +0000 (23:45 -0700)
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>
net/tipc/socket.c

index 361dc342f37737de2985ddbbfb59bc8475f0e5d8..9c834fc30112c148ca02348d113e2015a3a48dd8 100644 (file)
@@ -565,15 +565,15 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
                return -ERESTARTSYS;
         }
 
-        if (unlikely(sock->state != SS_CONNECTED)) {
-                if (sock->state == SS_DISCONNECTING)
-                        res = -EPIPE;   
-                else
-                        res = -ENOTCONN;
-                goto exit;
-        }
-
         do {
+               if (unlikely(sock->state != SS_CONNECTED)) {
+                       if (sock->state == SS_DISCONNECTING)
+                               res = -EPIPE;   
+                       else
+                               res = -ENOTCONN;
+                       goto exit;
+               }
+
                 res = tipc_send(tsock->p->ref, m->msg_iovlen, m->msg_iov);
                 if (likely(res != -ELINKCONG)) {
 exit: