libeech

BitTorrent library
git clone git://z3bra.org/libeech.git
Log | Files | Refs | README | LICENSE

commit d6e214df9c132f3fc29a82d30ff5b39ba3ef860d
parent 6b4860db6568bda6501332cb6134d1aeb0d9289c
Author: z3bra <contactatz3bradotorg>
Date:   Sun Jul  1 13:09:13 +0200

Rename sending function with 'tx' for clarity

Diffstat:
libeech.c | 34+++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/libeech.c b/libeech.c @@ -61,14 +61,14 @@ static struct peer * delpeer(struct peer *, struct peer *); static int peercnt(struct peer *); /* handle peer wire protocol (PWP) messages */ -static ssize_t pwphs(struct torrent *, struct peer *); -static ssize_t pwphsrecv(struct peer *); +static ssize_t pwptxhs(struct torrent *, struct peer *); +static ssize_t pwprxhs(struct peer *); static int pwphsck(struct torrent *, char *, long); -static ssize_t pwpst(struct peer *, int); -static ssize_t pwphv(struct peer *, int); -static ssize_t pwpbf(struct torrent *, struct peer *); -static ssize_t pwprq(struct torrent *, struct peer *); +static ssize_t pwptxst(struct peer *, int); +static ssize_t pwptxhv(struct peer *, int); +static ssize_t pwptxbf(struct torrent *, struct peer *); +static ssize_t pwptxrq(struct torrent *, struct peer *); static int pwprxst(struct peer *, int); static int pwprxhv(struct peer *, size_t, char *); @@ -343,7 +343,7 @@ peercnt(struct peer *pl) } static ssize_t -pwphs(struct torrent *t, struct peer *p) +pwptxhs(struct torrent *t, struct peer *p) { char m[68]; @@ -357,7 +357,7 @@ pwphs(struct torrent *t, struct peer *p) } static ssize_t -pwphsrecv(struct peer *p) +pwprxhs(struct peer *p) { ssize_t r; @@ -422,7 +422,7 @@ pwprecv(struct peer *p) */ static ssize_t -pwpst(struct peer *p, int t) +pwptxst(struct peer *p, int t) { char m[MSGSIZ]; @@ -438,7 +438,7 @@ pwpst(struct peer *p, int t) } static ssize_t -pwphv(struct peer *p, int n) +pwptxhv(struct peer *p, int n) { char m[MSGSIZ]; ssize_t off = 0; @@ -463,7 +463,7 @@ pwphv(struct peer *p, int n) } static ssize_t -pwpbf(struct torrent *t, struct peer *p) +pwptxbf(struct torrent *t, struct peer *p) { char m[MSGSIZ]; ssize_t l, off = 0; @@ -484,7 +484,7 @@ pwpbf(struct torrent *t, struct peer *p) } static ssize_t -pwprq(struct torrent *t, struct peer *p) +pwptxrq(struct torrent *t, struct peer *p) { int i; char m[MSGSIZ]; @@ -621,18 +621,18 @@ pwptx(struct torrent *t, struct peer *p) { /* send handshake */ if (!(p->state & HANDSHAKESENT)) { - pwphs(t, p); - pwpbf(t, p); + pwptxhs(t, p); + pwptxbf(t, p); p->state |= HANDSHAKESENT; } if ((p->state & LEECHING) && !(p->state & AMINTERESTED)) { - pwpst(p, INTERESTED); + pwptxst(p, INTERESTED); p->state |= AMINTERESTED; } if ((p->state & LEECHING) && !(p->state & AMCHOKING) && p->piece.n < 0) - pwprq(t, p); + pwptxrq(t, p); return 0; } @@ -642,7 +642,7 @@ pwprx(struct torrent *t, struct peer *p) { /* receive and verify handshake */ if (!(p->state & HANDSHAKERCVD)) { - pwphsrecv(p); + pwprxhs(p); if (p->rxbufsz >= 68 && pwphsck(t, p->rxbuf, p->rxbufsz)) { delpeer(t->peers, p); return -1;