From: Andre Noll Date: Sat, 15 Mar 2008 18:06:22 +0000 (+0100) Subject: net.c: Rename sendall() to write_all(). X-Git-Tag: v0.3.2~61^2~7 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=2fe2b6e212e8e0d09cd1a8fc95f7f2f3a1110485 net.c: Rename sendall() to write_all(). It actually uses write(), not send(). --- diff --git a/net.c b/net.c index 60139647..427ab0f0 100644 --- a/net.c +++ b/net.c @@ -346,16 +346,16 @@ struct in_addr extract_v4_addr(const struct sockaddr_storage *ss) } /* - * Send out a buffer, resend on short writes. + * Write a buffer to a file descriptor, re-write on short writes. * * \param fd The file descriptor. * \param buf The buffer to be sent. * \param len The length of \a buf. * - * \return Standard. In any case, the number of bytes actually sent is stored - * in \a len. + * \return Standard. In any case, the number of bytes that have been written is + * stored in \a len. */ -static int sendall(int fd, const char *buf, size_t *len) +static int write_all(int fd, const char *buf, size_t *len) { size_t total = *len; @@ -397,10 +397,10 @@ int send_bin_buffer(int fd, const char *buf, size_t len) /* RC4 may write more than len to the output buffer */ unsigned char *outbuf = para_malloc(ROUND_UP(len, 8)); (*cf)(len, (unsigned char *)buf, outbuf, private); - ret = sendall(fd, (char *)outbuf, &len); + ret = write_all(fd, (char *)outbuf, &len); free(outbuf); } else - ret = sendall(fd, buf, &len); + ret = write_all(fd, buf, &len); return ret; }