ソースを参照

Update btpd.npeers in the right place.

master
Richard Nyberg 19年前
コミット
2cb31f1244
1個のファイルの変更2行の追加5行の削除
  1. +2
    -5
      btpd/net.c

+ 2
- 5
btpd/net.c ファイルの表示

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

btpd.npeers++;
return 0;
}

@@ -955,12 +957,7 @@ net_connect(const char *ip, int port, int *sd)
return errno;

int error = net_connect2(res->ai_addr, res->ai_addrlen, sd);
freeaddrinfo(res);
if (error == 0)
btpd.npeers++;

return error;
}



読み込み中…
キャンセル
保存