torrentd

simple torrent daemon
git clone git://git.2f30.org/torrentd
Log | Files | Refs | LICENSE

commit b7d2d815cccbbfccb7bd9ad22b5a49cc1c1bcc8c
parent 995be1d691783afd8ce9bd77043ca80ca612f05a
Author: sin <sin@2f30.org>
Date:   Wed, 23 Dec 2015 18:29:41 +0000

rename funcs

Diffstat:
Mstorrent.h | 4++--
Mtracker.c | 4++--
Mutil.c | 4++--
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/storrent.h b/storrent.h @@ -75,8 +75,8 @@ void sha1sum(uint8_t *, unsigned long, uint8_t *); int readfile(char *, char **, size_t *); char *urlencode(char *, size_t); char *urldecode(char *); -ssize_t writeall(int, const void *, size_t); -ssize_t readall(int, void *, size_t); +ssize_t writen(int, const void *, size_t); +ssize_t readn(int, void *, size_t); #undef strlcpy size_t strlcpy(char *, const char *, size_t); #undef strlcat diff --git a/tracker.c b/tracker.c @@ -33,8 +33,8 @@ getpeers(struct torrent *t, struct ben **reply) if ((s = dial(host, port)) < 0) goto fail; - writeall(s, buf, r); - r = readall(s, buf, sizeof(buf) - 1); + writen(s, buf, r); + r = readn(s, buf, sizeof(buf) - 1); buf[r] = '\0'; if ((p = strstr(buf, "\r\n\r\n"))) { diff --git a/util.c b/util.c @@ -180,7 +180,7 @@ urldecode(char *s) } ssize_t -writeall(int fd, const void *buf, size_t count) +writen(int fd, const void *buf, size_t count) { const char *p = buf; ssize_t n; @@ -199,7 +199,7 @@ writeall(int fd, const void *buf, size_t count) } ssize_t -readall(int fd, void *buf, size_t count) +readn(int fd, void *buf, size_t count) { char *p = buf; ssize_t n;