X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=src%2Flibswift%2Fchannel.cpp;h=53130959014c7a76c8acaf9f485a5e77f5d1cef7;hb=93cdd6985320d3cf133ee08fde64dafa04d2d1b6;hp=2d9640cc501937b73578d7bdafd86a73c2c95fa2;hpb=76819a02188af33c0093cf776c4b86bfaf18d4fb;p=swifty.git diff --git a/src/libswift/channel.cpp b/src/libswift/channel.cpp index 2d9640c..5313095 100644 --- a/src/libswift/channel.cpp +++ b/src/libswift/channel.cpp @@ -322,9 +322,13 @@ int Channel::RecvFrom (evutil_socket_t sock, Address& addr, struct evbuffer **ev print_error("error on recv"); } length = 0; + printf("Received from %d addresses in one system call.\n", addr.addr->count); for (int i=0; icount; ++i) { - length += iov[i].iov_len; - vec[i].iov_len = iov[i].iov_len; + struct in_addr aux; + aux.s_addr = addr.addr->dests[i].addr; + printf("Received from %s, %d bytes\n", inet_ntoa(aux), addr.addr->dests[i].bytes); + length += addr.addr->dests[i].bytes; + vec[i].iov_len = addr.addr->dests[i].bytes; if (evbuffer_commit_space(evb[i], &vec[i], 1) < 0) { length = 0; print_error("error on evbuffer_commit_space");