ID:               24629
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zparta at skebo dot ac
-Status:           Closed
+Status:           Open
 Bug Type:         Sockets related
 Operating System: FreeBSD 4.8 (Only!)
 PHP Version:      4.3.3RC2-dev
 Assigned To:      jason


Previous Comments:
------------------------------------------------------------------------

[2003-07-22 10:07:13] [EMAIL PROTECTED]

also the same problem occurs with stream_select()
it also uses the select() call with sec and usec, see:
http://cvs.php.net/co.php/php-src/ext/standard/file.c?r=1.279.2.30

------------------------------------------------------------------------

[2003-07-22 10:03:57] [EMAIL PROTECTED]

note: you misspelled my email address in the CVS commit :(

It says: "Patch submitted from [EMAIL PROTECTED]"
but it should be:
"Patch submitted from [EMAIL PROTECTED]"
without the "r"


------------------------------------------------------------------------

[2003-07-22 02:21:38] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

Verified, apparently there are severl OSs that have this problem

------------------------------------------------------------------------

[2003-07-21 10:13:09] [EMAIL PROTECTED]

I will take a look at this patch tonight

-Jason

------------------------------------------------------------------------

[2003-07-20 16:26:01] [EMAIL PROTECTED]

here the same patch for the stream_select()

--- file.c.orig Sun Jul 20 23:25:34 2003
+++ file.c      Sun Jul 20 23:24:55 2003
@@ -803,8 +803,15 @@
        /* If seconds is not set to null, build the timeval, else we
wait indefinitely */
        if (sec != NULL) {
                convert_to_long_ex(&sec);
-               tv.tv_sec = Z_LVAL_P(sec);
-               tv.tv_usec = usec;
+
+               if (usec > 999999) {
+                       tv.tv_sec = Z_LVAL_P(sec)+(usec/1000000);
+                       tv.tv_usec = usec%1000000;
+               } else {
+                       tv.tv_sec = Z_LVAL_P(sec);
+                       tv.tv_usec = usec;
+               }
+
                tv_p = &tv;
        }


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/24629

-- 
Edit this bug report at http://bugs.php.net/?id=24629&edit=1

Reply via email to