From: Victor Grishchenko Date: Wed, 12 May 2010 15:07:01 +0000 (+0200) Subject: OS gives random port no anyway X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=00d8e207b4849583a6cff954e5bb4d73130b5964;p=swift-upb.git OS gives random port no anyway --- diff --git a/swift.cpp b/swift.cpp index 211448a..e391520 100644 --- a/swift.cpp +++ b/swift.cpp @@ -111,7 +111,7 @@ int main (int argc, char** argv) { quit("cant listen to %s\n",bindaddr.str()) } else if (tracker!=Address() || http_gw!=Address()) { // leeching for (int i=0; i<=10; i++) { - bindaddr = Address((uint32_t)INADDR_ANY,1024+rand()%10000); + bindaddr = Address((uint32_t)INADDR_ANY,0); if (Listen(bindaddr)>0) break; if (i==10)