Skip to content
Snippets Groups Projects
Commit 5414201b authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Now uses fd_select() in preference to select().

Fixes error reporting on WIN32.

Rev: src/modules/files/udp.c:1.72
parent 02fff0bb
Branches
Tags
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
|| This file is part of Pike. For copyright information see COPYRIGHT. || This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information. || for more information.
|| $Id: udp.c,v 1.71 2004/11/06 21:40:42 peter Exp $ || $Id: udp.c,v 1.72 2005/09/14 12:51:19 grubba Exp $
*/ */
#define NO_PIKE_SHORTHAND #define NO_PIKE_SHORTHAND
...@@ -197,6 +197,10 @@ static void udp_bind(INT32 args) ...@@ -197,6 +197,10 @@ static void udp_bind(INT32 args)
Pike_sp[-args].u.string->size_shift)) Pike_sp[-args].u.string->size_shift))
SIMPLE_BAD_ARG_ERROR("Stdio.UDP->bind", 1, "int|string (8bit)"); SIMPLE_BAD_ARG_ERROR("Stdio.UDP->bind", 1, "int|string (8bit)");
f_backtrace(0);
APPLY_MASTER("handle_error", 1);
pop_stack();
if(FD != -1) if(FD != -1)
{ {
fd_close(FD); fd_close(FD);
...@@ -496,7 +500,7 @@ void udp_wait(INT32 args) ...@@ -496,7 +500,7 @@ void udp_wait(INT32 args)
FD_SET(fd, &rset); FD_SET(fd, &rset);
tv.tv_sec = DO_NOT_WARN((int)timeout); tv.tv_sec = DO_NOT_WARN((int)timeout);
tv.tv_usec = DO_NOT_WARN((int)((timeout - ((int)timeout)) * 1000000.0)); tv.tv_usec = DO_NOT_WARN((int)((timeout - ((int)timeout)) * 1000000.0));
res = select(fd+1, &rset, NULL, NULL, &tv); res = fd_select(fd+1, &rset, NULL, NULL, &tv);
e = errno; e = errno;
THREADS_DISALLOW(); THREADS_DISALLOW();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment