bool always true in Socket.cpp,v 1.51 2003/11/11 20:31:57

Technical discussion about the NMDC and <a href="http://dcpp.net/ADC.html">ADC</A> protocol. The NMDC protocol is documented in the <a href="http://dcpp.net/wiki/">Wiki</a>, so feel free to refer to it.

Moderator: Moderators

DHCallahan
Posts: 3
Joined: 2003-11-25 00:39

bool always true in Socket.cpp,v 1.51 2003/11/11 20:31:57

Post by DHCallahan » 2003-12-16 17:41

lines 152 to 162 of Socket.cpp:

bool blocking = true;
if(::connect(sock,(sockaddr*)&serv_addr,sizeof(serv_addr)) == SOCKET_ERROR) {
// EWOULDBLOCK is ok, the attempt is still being made, and FD_CONNECT will be signaled...
if(errno != EWOULDBLOCK) {
checksockerr(SOCKET_ERROR);
} else {
blocking = true;
}
}
if(blocking)
connected = true;

the bool variable 'blocking' is always equal to true. Is this a mistake or are things being kept like this for later "adjustment" ? :?

DHCallahan
Posts: 3
Joined: 2003-11-25 00:39

Sorry, clicked wrong forum.....

Post by DHCallahan » 2003-12-16 17:48

Posted same in Programmer's Help Forum.

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 19:37

Post by TheParanoidOne » 2003-12-16 18:09

Double posting not necessary.
The world is coming to an end. Please log off.

DC++ Guide | Words

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 07:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-12-16 19:36

And don't write things in the subject of a post.

Who is online

Users browsing this forum: Google [Bot] and 0 guests