This website works better with JavaScript.
Home
Explore
Help
Sign In
Immanuel
/
btpd
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Add peer_full function.
master
Richard Nyberg
19 years ago
parent
3c0e61e112
commit
1c14af0ab4
2 changed files
with
7 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
btpd/peer.c
+1
-0
btpd/peer.h
+ 6
- 0
btpd/peer.c
View File
@@ -550,3 +550,9 @@ peer_active_up(struct peer *p)
return (p->flags & (PF_P_WANT|PF_I_CHOKE)) == PF_P_WANT
|| p->npiece_msgs > 0;
}
int
peer_full(struct peer *p)
{
return p->npieces == p->n->tp->meta.npieces;
}
+ 1
- 0
btpd/peer.h
View File
@@ -60,5 +60,6 @@ int peer_wanted(struct peer *p);
int peer_laden(struct peer *p);
int peer_has(struct peer *p, uint32_t index);
int peer_leech_ok(struct peer *p);
int peer_full(struct peer *p);
#endif
Write
Preview
Loading…
Cancel
Save