--- pth_high.c 2002/11/07 13:27:56 1.97
+++ pth_high.c 2002/11/07 15:07:54 1.98
@@ -592,7 +592,8 @@
return pth_error(-1, EBADF);
/* force filedescriptor into non-blocking mode */
- fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK);
+ if ((fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR)
+ return pth_error(-1, EBADF);
/* try to connect */
while ( (rv = pth_sc(connect)(s, (struct sockaddr *)addr, addrlen)) == -1
@@ -647,7 +648,8 @@
return pth_error(-1, EBADF);
/* force filedescriptor into non-blocking mode */
- fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK);
+ if ((fdmode = pth_fdmode(s, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR)
+ return pth_error(-1, EBADF);
/* poll socket via accept */
ev = NULL;
@@ -777,7 +779,8 @@
return pth_error(-1, EBADF);
/* force filedescriptor into non-blocking mode */
- fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK);
+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR)
+ return pth_error(-1, EBADF);
/* poll filedescriptor if not already in non-blocking operation */
if (fdmode != PTH_FDMODE_NONBLOCK) {
@@ -996,7 +999,8 @@
return pth_error(-1, EBADF);
/* force filedescriptor into non-blocking mode */
- fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK);
+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR)
+ return pth_error(-1, EBADF);
/* poll filedescriptor if not already in non-blocking operation */
if (fdmode != PTH_FDMODE_NONBLOCK) {
@@ -1380,7 +1384,8 @@
return pth_error(-1, EBADF);
/* force filedescriptor into non-blocking mode */
- fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK);
+ if ((fdmode = pth_fdmode(fd, PTH_FDMODE_NONBLOCK)) == PTH_FDMODE_ERROR)
+ return pth_error(-1, EBADF);
/* poll filedescriptor if not already in non-blocking operation */
if (fdmode != PTH_FDMODE_NONBLOCK) {
|