X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=net.c;h=c7bb8b4b71293ee89964b55175c2170fb10c3e31;hp=046cf0b76f63ca57129e0b3a699b5a0bb43ae651;hb=593c4a232a421a16fe2548c739544c43dec32b52;hpb=a05a33be9ed15982aabfa13726317a1fcb13cc19 diff --git a/net.c b/net.c index 046cf0b7..c7bb8b4b 100644 --- a/net.c +++ b/net.c @@ -120,7 +120,7 @@ static int sendall(int fd, const char *buf, size_t *len) total += n; bytesleft -= n; if (total < *len) - PARA_DEBUG_LOG("short write (%zd byte(s) left)", + PARA_DEBUG_LOG("short write (%zd byte(s) left)\n", *len - total); } *len = total; /* return number actually sent here */ @@ -232,7 +232,7 @@ __must_check int recv_bin_buffer(int fd, char *buf, size_t size) } else n = recv(fd, buf, size, 0); if (n == -1) - n = -E_RECV; + return -ERRNO_TO_PARA_ERROR(errno); return n; }