about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard Nyberg <rnyberg@murmeldjur.se>2006-01-16 17:05:30 +0000
committerRichard Nyberg <rnyberg@murmeldjur.se>2006-01-16 17:05:30 +0000
commit49da7acdd43a824c53f36ad4a12d9d39dc81834a (patch)
treee6afd63855bb75b426f58337453fa913fba42c7f
parent6f09434ea044145c3e790d21aff03aff1bcedf93 (diff)
downloadbtpd-49da7acdd43a824c53f36ad4a12d9d39dc81834a.tar.gz
btpd-49da7acdd43a824c53f36ad4a12d9d39dc81834a.zip
Fix conditional I broke in r131.
-rw-r--r--btpd/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btpd/net.c b/btpd/net.c
index fca3143..c728efd 100644
--- a/btpd/net.c
+++ b/btpd/net.c
@@ -235,7 +235,7 @@ net_dispatch_msg(struct peer *p, const char *buf)
             length = net_read32(buf + 8);
             if ((length > PIECE_BLOCKLEN
                     || index >= p->n->tp->meta.npieces
-                    || cm_has_piece(p->n->tp, index)
+                    || !cm_has_piece(p->n->tp, index)
                     || begin + length > torrent_piece_size(p->n->tp, index))) {
                 btpd_log(BTPD_L_MSG, "bad request: (%u, %u, %u) from %p\n",
                          index, begin, length, p);