X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=net.c;h=c7bb8b4b71293ee89964b55175c2170fb10c3e31;hp=9a93553985516b0db7150d20af99136b33165910;hb=d81f6efa05b305c9a8655124b001ea71e1c86679;hpb=ea689d919fd6fdbfaba2de9d1cd207e033c319fd;ds=sidebyside diff --git a/net.c b/net.c index 9a935539..c7bb8b4b 100644 --- a/net.c +++ b/net.c @@ -6,8 +6,8 @@ /** \file net.c networking-related helper functions */ -#include "error.h" #include "para.h" +#include "error.h" #include "net.h" #include "string.h" @@ -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; }