]> granicus.if.org Git - php/commitdiff
Make sure this is initialized...
authorWez Furlong <wez@php.net>
Sat, 31 Jul 2004 10:49:09 +0000 (10:49 +0000)
committerWez Furlong <wez@php.net>
Sat, 31 Jul 2004 10:49:09 +0000 (10:49 +0000)
main/streams/xp_socket.c

index d6fb72257e1f57c3203ed2c2cf76d0eeea52766c..bcfa33b0255bdf913b3cb264cbe9d049827b7292 100644 (file)
@@ -233,11 +233,13 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void
                                if (value == -1) {
                                        if (sock->timeout.tv_sec == -1) {
                                                tv.tv_sec = FG(default_socket_timeout);
+                                               tv.tv_usec = 0;
                                        } else {
                                                tv = sock->timeout;
                                        }
                                } else {
                                        tv.tv_sec = value;
+                                       tv.tv_usec = 0;
                                }
 
                                if (sock->socket == -1) {