[PATCH] For sockets extension.

From: Date: Mon, 15 Oct 2001 17:28:56 +0000
Subject: [PATCH] For sockets extension.
Groups: php.dev 
Request: Send a blank email to php-dev+get-67965@lists.php.net to get a copy of this message
Not too long ago I brought up an apparent bug in the sockets extension, specifically the socket_select() function. (See bug #13566 -- "BUG FIX? for ext/sockets".) Briefly, the problem: when using the system select(), passing NULL in place of a timeval struct causes select() to block indefinitely. PHP's socket_select() doesn't have this capability. Here's a fix based what I had suggested with a comment or two from Marcus Fischer: basically, make the 4th and 5th arguments to socket_select() optional. If neither are used, assume NULL for the tv struct. Argument 5 defaults to 0 if argument 4 is used, and the behaviour is as before when both are used. Attached is the patch, which should be applied to sockets.c, v. 1.71 in CVS. Cheers. J

Attachment: [text/x-diff] Fix for socket_select(). patch-sockets
« previous php.dev (#67965) next »