correct some bitwise operators and permit debugger breakpoints
r2966 | dcl | 2010-07-01 12:38:34 +1000 (Thu, 01 Jul 2010) | 2 lines
This commit is contained in:
10
network.c
10
network.c
@@ -327,7 +327,7 @@ CreateSocketAdress(
|
||||
return -1;
|
||||
}
|
||||
oldopts = fcntl(self->sockid, F_GETFL, 0);
|
||||
if (! (oldopts | O_NONBLOCK)) {
|
||||
if (! (oldopts & O_NONBLOCK)) { /* DCL was | */
|
||||
/* assume success when in blocking mode */
|
||||
return 1;
|
||||
}
|
||||
@@ -358,7 +358,7 @@ CreateSocketAdress(
|
||||
}
|
||||
}
|
||||
/* reset to blocking mode */
|
||||
fcntl(self->sockid, F_SETFL, oldopts | ~ O_NONBLOCK);
|
||||
fcntl(self->sockid, F_SETFL, oldopts & ~ O_NONBLOCK); /* DCL was | */
|
||||
return iret;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
@@ -476,7 +476,8 @@ CreateSocketAdress(
|
||||
expire = time(NULL) + TIMEOUT;
|
||||
while (l > 0) {
|
||||
delta = expire - time(NULL);
|
||||
if (delta <= 0) break;
|
||||
if (delta <= 0)
|
||||
break;
|
||||
FD_SET(self->sockid,&lMask);
|
||||
tmo.tv_usec = 0;
|
||||
tmo.tv_sec = delta;
|
||||
@@ -490,7 +491,8 @@ CreateSocketAdress(
|
||||
NetError(buf);
|
||||
return 0;
|
||||
}
|
||||
if (!FD_ISSET(self->sockid,&lMask)) break;
|
||||
if (!FD_ISSET(self->sockid,&lMask))
|
||||
break;
|
||||
|
||||
iRet = send(self->sockid,pos,l,0);
|
||||
disconnected = (iRet == 0);
|
||||
|
||||
Reference in New Issue
Block a user