stas                                     Sat, 19 Dec 2009 01:13:33 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292309

Log:
fix bug #50196

Bug: http://bugs.php.net/50196 (Open) stream_copy_to_stream() produces warning 
when source is not file
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
    U   php/php-src/trunk/main/streams/xp_socket.c

Modified: php/php-src/branches/PHP_5_3/main/streams/xp_socket.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/streams/xp_socket.c       2009-12-19 
01:08:32 UTC (rev 292308)
+++ php/php-src/branches/PHP_5_3/main/streams/xp_socket.c       2009-12-19 
01:13:33 UTC (rev 292309)
@@ -223,7 +223,11 @@
 static int php_sockop_stat(php_stream *stream, php_stream_statbuf *ssb 
TSRMLS_DC)
 {
        php_netstream_data_t *sock = (php_netstream_data_t*)stream->abstract;
+#if ZEND_WIN32
+       return 0;
+#else
        return fstat(sock->socket, &ssb->sb);
+#endif
 }

 static inline int sock_sendto(php_netstream_data_t *sock, char *buf, size_t 
buflen, int flags,

Modified: php/php-src/trunk/main/streams/xp_socket.c
===================================================================
--- php/php-src/trunk/main/streams/xp_socket.c  2009-12-19 01:08:32 UTC (rev 
292308)
+++ php/php-src/trunk/main/streams/xp_socket.c  2009-12-19 01:13:33 UTC (rev 
292309)
@@ -223,7 +223,11 @@
 static int php_sockop_stat(php_stream *stream, php_stream_statbuf *ssb 
TSRMLS_DC)
 {
        php_netstream_data_t *sock = (php_netstream_data_t*)stream->abstract;
+#if ZEND_WIN32
+       return 0;
+#else
        return fstat(sock->socket, &ssb->sb);
+#endif
 }

 static inline int sock_sendto(php_netstream_data_t *sock, char *buf, size_t 
buflen, int flags,

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to