瀏覽代碼

Move increment of btpd.npeers to a more fitting location.

master
Richard Nyberg 19 年之前
父節點
當前提交
27ba618c5e
共有 2 個檔案被更改,包括 1 行新增2 行删除
  1. +0
    -2
      btpd/net.c
  2. +1
    -0
      btpd/peer.c

+ 0
- 2
btpd/net.c 查看文件

@@ -933,7 +933,6 @@ net_connect2(struct sockaddr *sa, socklen_t salen, int *sd)
return errno;
}

btpd.npeers++;
return 0;
}

@@ -983,7 +982,6 @@ net_connection_cb(int sd, short type, void *arg)
return;
}

btpd.npeers++;
peer_create_in(nsd);

btpd_log(BTPD_L_CONN, "got connection.\n");


+ 1
- 0
btpd/peer.c 查看文件

@@ -151,6 +151,7 @@ peer_create_common(int sd)
event_set(&p->in_ev, p->sd, EV_READ, net_read_cb, p);
event_add(&p->in_ev, NULL);

btpd.npeers++;
return p;
}



Loading…
取消
儲存