about summary refs log tree commit diff
path: root/btpd/download_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'btpd/download_subr.c')
-rw-r--r--btpd/download_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btpd/download_subr.c b/btpd/download_subr.c
index df2aaaf..67d9e85 100644
--- a/btpd/download_subr.c
+++ b/btpd/download_subr.c
@@ -106,7 +106,7 @@ static int
 dl_should_enter_endgame(struct net *n)
 {
     int should;
-    if (cm_get_npieces(n->tp) + n->npcs_busy == n->tp->meta.npieces) {
+    if (cm_pieces(n->tp) + n->npcs_busy == n->tp->meta.npieces) {
         should = 1;
         struct piece *pc;
         BTPDQ_FOREACH(pc, &n->getlst, entry) {