소스 검색

Add tests for correctness.

master
Richard Nyberg 19 년 전
부모
커밋
2904cdca2d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. +2
    -0
      btpd/peer.c

+ 2
- 0
btpd/peer.c 파일 보기

@@ -125,6 +125,7 @@ peer_choke(struct peer *p)
void
peer_want(struct peer *p, uint32_t index)
{
assert(p->nwant < p->npieces);
p->nwant++;
if (p->nwant == 1) {
p->flags |= PF_I_WANT;
@@ -135,6 +136,7 @@ peer_want(struct peer *p, uint32_t index)
void
peer_unwant(struct peer *p, uint32_t index)
{
assert(p->nwant > 0);
p->nwant--;
if (p->nwant == 0) {
p->flags &= ~PF_I_WANT;


불러오는 중...
취소
저장