From: Adrian Bondrescu Date: Sun, 15 Jul 2012 11:44:54 +0000 (+0300) Subject: Set the bytes value in the mptp_dest structure when sending message. X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=ff99f32868c3850fc0ae71a652563eb70e32ea77;p=swifty.git Set the bytes value in the mptp_dest structure when sending message. --- diff --git a/src/kernel/mptp.c b/src/kernel/mptp.c index 1ee2441..c4f5644 100644 --- a/src/kernel/mptp.c +++ b/src/kernel/mptp.c @@ -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;