[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2009-05-04 Thread Antony Dovgal
tony2001Mon May  4 14:44:47 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  MFH: use correct function
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.16r2=1.118.2.2.2.6.2.17diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.16 
php-src/main/network.c:1.118.2.2.2.6.2.17
--- php-src/main/network.c:1.118.2.2.2.6.2.16   Mon May  4 14:25:17 2009
+++ php-src/main/network.c  Mon May  4 14:44:46 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.16 2009/05/04 14:25:17 tony2001 Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.17 2009/05/04 14:44:46 tony2001 Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -792,7 +792,7 @@
switch (sa-sa_family) {
 #if HAVE_GETADDRINFO  HAVE_IPV6
case AF_INET6:
-   if (bindto  strstr(bindto, ':')) {
+   if (bindto  strchr(bindto, ':')) {
((struct sockaddr_in6 
*)sa)-sin6_family = sa-sa_family;
((struct sockaddr_in6 *)sa)-sin6_port 
= htons(port);
socklen = sizeof(struct sockaddr_in6);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2009-05-04 Thread Antony Dovgal
tony2001Mon May  4 14:25:17 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  MFH: don't segfault on bindto == NULL
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.15r2=1.118.2.2.2.6.2.16diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.15 
php-src/main/network.c:1.118.2.2.2.6.2.16
--- php-src/main/network.c:1.118.2.2.2.6.2.15   Mon May  4 13:09:15 2009
+++ php-src/main/network.c  Mon May  4 14:25:17 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.15 2009/05/04 13:09:15 iliaa Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.16 2009/05/04 14:25:17 tony2001 Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -792,7 +792,7 @@
switch (sa-sa_family) {
 #if HAVE_GETADDRINFO  HAVE_IPV6
case AF_INET6:
-   if (strstr(bindto, ':')) {
+   if (bindto  strstr(bindto, ':')) {
((struct sockaddr_in6 
*)sa)-sin6_family = sa-sa_family;
((struct sockaddr_in6 *)sa)-sin6_port 
= htons(port);
socklen = sizeof(struct sockaddr_in6);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2009-01-02 Thread Felipe Pena
felipe  Fri Jan  2 21:28:28 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  - MFH: Working with unintialized errno (#46917, noticed by Jost Boekemeier)
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.11r2=1.118.2.2.2.6.2.12diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.11 
php-src/main/network.c:1.118.2.2.2.6.2.12
--- php-src/main/network.c:1.118.2.2.2.6.2.11   Wed Dec 31 11:15:47 2008
+++ php-src/main/network.c  Fri Jan  2 21:28:28 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.11 2008/12/31 11:15:47 sebastian Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.12 2009/01/02 21:28:28 felipe Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -1147,6 +1147,7 @@
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000;
}
+   errno = 0;
n = select(max_fd + 1, rset, wset, eset, timeout = 0 ? tv : NULL);
 
if (n = 0) {



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2009-01-02 Thread Felipe Pena
felipe  Fri Jan  2 21:42:52 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  - MFH: Errr, rule nº 1: be portable :)
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.12r2=1.118.2.2.2.6.2.13diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.12 
php-src/main/network.c:1.118.2.2.2.6.2.13
--- php-src/main/network.c:1.118.2.2.2.6.2.12   Fri Jan  2 21:28:28 2009
+++ php-src/main/network.c  Fri Jan  2 21:42:52 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.12 2009/01/02 21:28:28 felipe Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.13 2009/01/02 21:42:52 felipe Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -1147,7 +1147,9 @@
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000;
}
+#ifndef PHP_WIN32
errno = 0;
+#endif
n = select(max_fd + 1, rset, wset, eset, timeout = 0 ? tv : NULL);
 
if (n = 0) {



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



RE: [PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2009-01-02 Thread Andi Gutmans
Does this mean you should be using WSASetLastError() on Windows?

Andi

 -Original Message-
 From: Felipe Pena [mailto:fel...@php.net]
 Sent: Friday, January 02, 2009 1:43 PM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /main network.c
 
 felipeFri Jan  2 21:42:52 2009 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-src/main network.c
   Log:
   - MFH: Errr, rule nº 1: be portable :)
 
 http://cvs.php.net/viewvc.cgi/php-
 src/main/network.c?r1=1.118.2.2.2.6.2.12r2=1.118.2.2.2.6.2.13diff_format=u
 Index: php-src/main/network.c
 diff -u php-src/main/network.c:1.118.2.2.2.6.2.12 php-
 src/main/network.c:1.118.2.2.2.6.2.13
 --- php-src/main/network.c:1.118.2.2.2.6.2.12 Fri Jan  2 21:28:28 2009
 +++ php-src/main/network.cFri Jan  2 21:42:52 2009
 @@ -17,7 +17,7 @@
 +--+
   */
 
 -/* $Id: network.c,v 1.118.2.2.2.6.2.12 2009/01/02 21:28:28 felipe Exp $ */
 +/* $Id: network.c,v 1.118.2.2.2.6.2.13 2009/01/02 21:42:52 felipe Exp $ */
 
  /*#define DEBUG_MAIN_NETWORK 1*/
 
 @@ -1147,7 +1147,9 @@
   tv.tv_sec = timeout / 1000;
   tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000;
   }
 +#ifndef PHP_WIN32
   errno = 0;
 +#endif
   n = select(max_fd + 1, rset, wset, eset, timeout = 0 ? tv : NULL);
 
   if (n = 0) {
 
 
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2009-01-02 Thread Felipe Pena
felipe  Sat Jan  3 00:06:33 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  - MFH: Windows part
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.13r2=1.118.2.2.2.6.2.14diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.13 
php-src/main/network.c:1.118.2.2.2.6.2.14
--- php-src/main/network.c:1.118.2.2.2.6.2.13   Fri Jan  2 21:42:52 2009
+++ php-src/main/network.c  Sat Jan  3 00:06:33 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.13 2009/01/02 21:42:52 felipe Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.14 2009/01/03 00:06:33 felipe Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -1147,7 +1147,10 @@
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000;
}
-#ifndef PHP_WIN32
+/* Reseting/initializing */
+#ifdef PHP_WIN32
+   WSASetLastError(0);
+#else
errno = 0;
 #endif
n = select(max_fd + 1, rset, wset, eset, timeout = 0 ? tv : NULL);



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



RE: [PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2009-01-02 Thread Felipe Pena
Em Sex, 2009-01-02 às 14:34 -0800, Andi Gutmans escreveu:
 Does this mean you should be using WSASetLastError() on Windows?
 

You are right! :)

 Andi
 
  -Original Message-
  From: Felipe Pena [mailto:fel...@php.net]
  Sent: Friday, January 02, 2009 1:43 PM
  To: php-cvs@lists.php.net
  Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /main network.c
  
  felipe  Fri Jan  2 21:42:52 2009 UTC
  
Modified files:  (Branch: PHP_5_3)
  /php-src/main   network.c
Log:
- MFH: Errr, rule nº 1: be portable :)
  
  http://cvs.php.net/viewvc.cgi/php-
  src/main/network.c?r1=1.118.2.2.2.6.2.12r2=1.118.2.2.2.6.2.13diff_format=u
  Index: php-src/main/network.c
  diff -u php-src/main/network.c:1.118.2.2.2.6.2.12 php-
  src/main/network.c:1.118.2.2.2.6.2.13
  --- php-src/main/network.c:1.118.2.2.2.6.2.12   Fri Jan  2 21:28:28 2009
  +++ php-src/main/network.c  Fri Jan  2 21:42:52 2009
  @@ -17,7 +17,7 @@
  +--+
*/
  
  -/* $Id: network.c,v 1.118.2.2.2.6.2.12 2009/01/02 21:28:28 felipe Exp $ */
  +/* $Id: network.c,v 1.118.2.2.2.6.2.13 2009/01/02 21:42:52 felipe Exp $ */
  
   /*#define DEBUG_MAIN_NETWORK 1*/
  
  @@ -1147,7 +1147,9 @@
  tv.tv_sec = timeout / 1000;
  tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000;
  }
  +#ifndef PHP_WIN32
  errno = 0;
  +#endif
  n = select(max_fd + 1, rset, wset, eset, timeout = 0 ? tv : NULL);
  
  if (n = 0) {
  
  
  
  --
  PHP CVS Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Regards,
Felipe Pena


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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2008-11-04 Thread Arnaud Le Blanc
lbarnaudTue Nov  4 20:40:30 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  MFH: initialize memory
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.9r2=1.118.2.2.2.6.2.10diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.9 
php-src/main/network.c:1.118.2.2.2.6.2.10
--- php-src/main/network.c:1.118.2.2.2.6.2.9Fri Oct 24 10:44:43 2008
+++ php-src/main/network.c  Tue Nov  4 20:40:30 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.9 2008/10/24 10:44:43 felipe Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.10 2008/11/04 20:40:30 lbarnaud Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -647,6 +647,7 @@
 {
php_sockaddr_storage sa;
socklen_t sl = sizeof(sa);
+   memset(sa, 0, sizeof(sa));

if (getpeername(sock, (struct sockaddr*)sa, sl) == 0) {
php_network_populate_name_from_sockaddr((struct sockaddr*)sa, 
sl,
@@ -666,6 +667,7 @@
 {
php_sockaddr_storage sa;
socklen_t sl = sizeof(sa);
+   memset(sa, 0, sizeof(sa));

if (getsockname(sock, (struct sockaddr*)sa, sl) == 0) {
php_network_populate_name_from_sockaddr((struct sockaddr*)sa, 
sl,



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2008-10-24 Thread Felipe Pena
felipe  Fri Oct 24 10:44:43 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  - MFH: Fixed bug #46082 (stream_set_blocking() can cause a crash in some 
circumstances)
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.8r2=1.118.2.2.2.6.2.9diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.8 
php-src/main/network.c:1.118.2.2.2.6.2.9
--- php-src/main/network.c:1.118.2.2.2.6.2.8Sat Aug 23 19:22:10 2008
+++ php-src/main/network.c  Fri Oct 24 10:44:43 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.8 2008/08/23 19:22:10 pajoye Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.9 2008/10/24 10:44:43 felipe Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -1057,7 +1057,11 @@
/* with ioctlsocket, a non-zero sets nonblocking, a zero sets blocking 
*/
flags = !block;
if (ioctlsocket(socketd, FIONBIO, flags) == SOCKET_ERROR) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
WSAGetLastError());
+   char *error_string;
+   
+   error_string = php_socket_strerror(WSAGetLastError(), NULL, 0);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, error_string);
+   efree(error_string);
ret = FAILURE;
}
 #else



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2008-03-11 Thread Antony Dovgal
tony2001Tue Mar 11 10:27:10 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  MFH: fix segfault - error_string may be NULL, in this case we have to follow 
the old behavior
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.5r2=1.118.2.2.2.6.2.6diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.5 
php-src/main/network.c:1.118.2.2.2.6.2.6
--- php-src/main/network.c:1.118.2.2.2.6.2.5Mon Mar 10 19:54:47 2008
+++ php-src/main/network.c  Tue Mar 11 10:27:10 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.5 2008/03/10 19:54:47 andrey Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.6 2008/03/11 10:27:10 tony2001 Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -205,12 +205,20 @@
 # endif

if ((n = getaddrinfo(host, NULL, hints, res))) {
-   spprintf(error_string, 0, php_network_getaddresses: 
getaddrinfo failed: %s, PHP_GAI_STRERROR(n));
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, php_network_getaddresses: 
getaddrinfo failed: %s, PHP_GAI_STRERROR(n));
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
*error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
php_network_getaddresses: getaddrinfo failed: %s, PHP_GAI_STRERROR(n));
+   }
return 0;
} else if (res == NULL) {
-   spprintf(error_string, 0, php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d, errno);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d, errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
*error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
php_network_getaddresses: getaddrinfo failed (null result pointer));
+   }
return 0;
}
 
@@ -234,8 +242,12 @@
/* XXX NOT THREAD SAFE (is safe under win32) */
host_info = gethostbyname(host);
if (host_info == NULL) {
-   spprintf(error_string, 0, php_network_getaddresses: 
gethostbyname failed. errno=%d, errno);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, 
php_network_getaddresses: gethostbyname failed. errno=%d, errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
%s, *error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
php_network_getaddresses: gethostbyname failed);
+   }
return 0;
}
in = *((struct in_addr *) host_info-h_addr);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c /main/streams xp_socket.c

2008-03-10 Thread Andrey Hristov
andrey  Mon Mar 10 19:54:47 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
/php-src/main/streams   xp_socket.c 
  Log:
  char **error_message was passed but not used. This causes problems in cases
  of getaddrinfo() failure, because the upper layers don't get the error.
  initialize a variable because we were reading initialized in case of error.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.4r2=1.118.2.2.2.6.2.5diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.4 
php-src/main/network.c:1.118.2.2.2.6.2.5
--- php-src/main/network.c:1.118.2.2.2.6.2.4Mon Dec 31 07:17:17 2007
+++ php-src/main/network.c  Mon Mar 10 19:54:47 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.4 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.5 2008/03/10 19:54:47 andrey Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -205,10 +205,12 @@
 # endif

if ((n = getaddrinfo(host, NULL, hints, res))) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
php_network_getaddresses: getaddrinfo failed: %s, PHP_GAI_STRERROR(n));
+   spprintf(error_string, 0, php_network_getaddresses: 
getaddrinfo failed: %s, PHP_GAI_STRERROR(n));
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
*error_string);
return 0;
} else if (res == NULL) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
php_network_getaddresses: getaddrinfo failed (null result pointer));
+   spprintf(error_string, 0, php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d, errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
*error_string);
return 0;
}
 
@@ -232,7 +234,8 @@
/* XXX NOT THREAD SAFE (is safe under win32) */
host_info = gethostbyname(host);
if (host_info == NULL) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
php_network_getaddresses: gethostbyname failed);
+   spprintf(error_string, 0, php_network_getaddresses: 
gethostbyname failed. errno=%d, errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
*error_string);
return 0;
}
in = *((struct in_addr *) host_info-h_addr);
http://cvs.php.net/viewvc.cgi/php-src/main/streams/xp_socket.c?r1=1.33.2.2.2.6.2.2r2=1.33.2.2.2.6.2.3diff_format=u
Index: php-src/main/streams/xp_socket.c
diff -u php-src/main/streams/xp_socket.c:1.33.2.2.2.6.2.2 
php-src/main/streams/xp_socket.c:1.33.2.2.2.6.2.3
--- php-src/main/streams/xp_socket.c:1.33.2.2.2.6.2.2   Wed Feb 27 00:30:24 2008
+++ php-src/main/streams/xp_socket.cMon Mar 10 19:54:47 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: xp_socket.c,v 1.33.2.2.2.6.2.2 2008/02/27 00:30:24 iliaa Exp $ */
+/* $Id: xp_socket.c,v 1.33.2.2.2.6.2.3 2008/03/10 19:54:47 andrey Exp $ */
 
 #include php.h
 #include ext/standard/file.h
@@ -601,7 +601,7 @@
 {
char *host = NULL, *bindto = NULL;
int portno, bindport = 0;
-   int err;
+   int err = 0;
int ret;
zval **tmpzval = NULL;
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2007-11-06 Thread Rob Richards
rrichards   Tue Nov  6 10:57:26 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  MFH: fix non ipv6 enabled win build
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.2r2=1.118.2.2.2.6.2.3diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.2 
php-src/main/network.c:1.118.2.2.2.6.2.3
--- php-src/main/network.c:1.118.2.2.2.6.2.2Fri Oct 12 08:07:13 2007
+++ php-src/main/network.c  Tue Nov  6 10:57:26 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.2 2007/10/12 08:07:13 edink Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.3 2007/11/06 10:57:26 rrichards Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -91,7 +91,9 @@
 # define SOCK_CONN_ERR SOCKET_ERROR
 # define PHP_TIMEOUT_ERROR_VALUE   WSAETIMEDOUT
 
+#if HAVE_IPV6
 const struct in6_addr in6addr_any = {0}; /* IN6ADDR_ANY_INIT; */
+#endif
 
 #else
 # define SOCK_ERR -1

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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c php_network.h

2007-10-09 Thread Elizabeth Marie Smith
auroraeosrose   Tue Oct  9 21:53:44 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c php_network.h 
  Log:
  Fix build on MSVC 2008 - channeling Wez
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6r2=1.118.2.2.2.6.2.1diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6 
php-src/main/network.c:1.118.2.2.2.6.2.1
--- php-src/main/network.c:1.118.2.2.2.6Wed Jul 18 09:04:58 2007
+++ php-src/main/network.c  Tue Oct  9 21:53:44 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6 2007/07/18 09:04:58 jani Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.1 2007/10/09 21:53:44 auroraeosrose Exp $ 
*/
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -90,6 +90,9 @@
 # define SOCK_ERR INVALID_SOCKET
 # define SOCK_CONN_ERR SOCKET_ERROR
 # define PHP_TIMEOUT_ERROR_VALUE   WSAETIMEDOUT
+
+struct in6_addr in6addr_any = {0}; /* IN6ADDR_ANY_INIT; */
+
 #else
 # define SOCK_ERR -1
 # define SOCK_CONN_ERR -1
http://cvs.php.net/viewvc.cgi/php-src/main/php_network.h?r1=1.56.2.1.2.1r2=1.56.2.1.2.1.2.1diff_format=u
Index: php-src/main/php_network.h
diff -u php-src/main/php_network.h:1.56.2.1.2.1 
php-src/main/php_network.h:1.56.2.1.2.1.2.1
--- php-src/main/php_network.h:1.56.2.1.2.1 Mon Jan  1 09:36:11 2007
+++ php-src/main/php_network.h  Tue Oct  9 21:53:44 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_network.h,v 1.56.2.1.2.1 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: php_network.h,v 1.56.2.1.2.1.2.1 2007/10/09 21:53:44 auroraeosrose Exp 
$ */
 
 #ifndef _PHP_NETWORK_H
 #define _PHP_NETWORK_H
@@ -121,12 +121,14 @@
 
 PHPAPI int php_poll2(php_pollfd *ufds, unsigned int nfds, int timeout);
 
+#ifndef POLLIN
 # define POLLIN  0x0001/* There is data to read */
 # define POLLPRI 0x0002/* There is urgent data to read */
 # define POLLOUT 0x0004/* Writing now will not block */
 # define POLLERR 0x0008/* Error condition */
 # define POLLHUP 0x0010/* Hung up */
 # define POLLNVAL0x0020/* Invalid request: fd not open */
+#endif
 
 # ifndef PHP_USE_POLL_2_EMULATION
 #  define PHP_USE_POLL_2_EMULATION 1

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