]> p2p-next.cs.pub.ro Git - swifty.git/commitdiff
Set the bytes value in the mptp_dest structure when sending message.
authorAdrian Bondrescu <adi.bondrescu@gmail.com>
Sun, 15 Jul 2012 11:44:54 +0000 (14:44 +0300)
committerAdrian Bondrescu <adi.bondrescu@gmail.com>
Sun, 15 Jul 2012 11:44:54 +0000 (14:44 +0300)
src/kernel/mptp.c

index 83f7b1e8cd3f21723e1d4b56d1f9f5ded28d8f7d..c46461dc8fb1c2e7d0b6f260b3c56b987d7ed2bd 100644 (file)
@@ -341,8 +341,11 @@ static int mptp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *
         if (likely(!err)) {
             log_debug("Sent %u bytes on wire\n", len);
                        ret += len;
-               } else
+                       dest->bytes = len;
+               } else {
             log_error("ip_queue_xmit failed\n");
+                       dest->bytes = -1;
+               }
     }
 
        return ret;