浏览代码

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; return errno;
} }


btpd.npeers++;
return 0; return 0;
} }


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


btpd.npeers++;
peer_create_in(nsd); peer_create_in(nsd);


btpd_log(BTPD_L_CONN, "got connection.\n"); 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_set(&p->in_ev, p->sd, EV_READ, net_read_cb, p);
event_add(&p->in_ev, NULL); event_add(&p->in_ev, NULL);


btpd.npeers++;
return p; return p;
} }




正在加载...
取消
保存