From: <arn...@us...> - 2006-07-23 12:21:26
|
Revision: 642 Author: arnetheduck Date: 2006-07-23 05:21:17 -0700 (Sun, 23 Jul 2006) ViewCVS: http://svn.sourceforge.net/dcplusplus/?rev=642&view=rev Log Message: ----------- wait fix Modified Paths: -------------- dcplusplus/trunk/client/ConnectionManager.cpp dcplusplus/trunk/client/Socket.cpp Modified: dcplusplus/trunk/client/ConnectionManager.cpp =================================================================== --- dcplusplus/trunk/client/ConnectionManager.cpp 2006-07-23 09:31:25 UTC (rev 641) +++ dcplusplus/trunk/client/ConnectionManager.cpp 2006-07-23 12:21:17 UTC (rev 642) @@ -264,7 +264,7 @@ int ConnectionManager::Server::run() throw() { try { while(!die) { - if(sock.wait(POLL_TIMEOUT, Socket::WAIT_CONNECT) == Socket::WAIT_CONNECT) { + if(sock.wait(POLL_TIMEOUT, Socket::WAIT_READ) == Socket::WAIT_READ) { ConnectionManager::getInstance()->accept(sock, secure); } } Modified: dcplusplus/trunk/client/Socket.cpp =================================================================== --- dcplusplus/trunk/client/Socket.cpp 2006-07-23 09:31:25 UTC (rev 641) +++ dcplusplus/trunk/client/Socket.cpp 2006-07-23 12:21:17 UTC (rev 642) @@ -437,14 +437,14 @@ if(waitFor & WAIT_CONNECT) { dcassert(!(waitFor & WAIT_READ) && !(waitFor & WAIT_WRITE)); - FD_ZERO(&rfd); + FD_ZERO(&wfd); FD_ZERO(&efd); - FD_SET(sock, &rfd); + FD_SET(sock, &wfd); FD_SET(sock, &efd); - check(select((int)(sock+1), &rfd, 0, &efd, &tv)); + check(select((int)(sock+1), 0, &wfd, &efd, &tv)); - if(FD_ISSET(sock, &rfd)) { + if(FD_ISSET(sock, &wfd)) { return WAIT_CONNECT; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |