From 2fe2b6e212e8e0d09cd1a8fc95f7f2f3a1110485 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 15 Mar 2008 19:06:22 +0100 Subject: [PATCH] net.c: Rename sendall() to write_all(). It actually uses write(), not send(). --- net.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; } -- 2.39.5