diff src/event/ngx_event_connect.c @ 10:46833bd150cb NGINX_0_1_5

nginx 0.1.5 *) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
author Igor Sysoev <http://sysoev.ru>
date Thu, 11 Nov 2004 00:00:00 +0300
parents 4b2dafa26fe2
children 8b6db3bda591
line wrap: on
line diff
--- a/src/event/ngx_event_connect.c
+++ b/src/event/ngx_event_connect.c
@@ -13,7 +13,7 @@
 
 /* AF_INET only */
 
-int ngx_event_connect_peer(ngx_peer_connection_t *pc)
+ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc)
 {
     int                  rc;
     ngx_uint_t           instance;
@@ -107,7 +107,7 @@ int ngx_event_connect_peer(ngx_peer_conn
     /* ngx_unlock_mutex(pc->peers->mutex); */
 
 
-    s = ngx_socket(AF_INET, SOCK_STREAM, IPPROTO_IP, 0);
+    s = ngx_socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
 
     if (s == -1) {
         ngx_log_error(NGX_LOG_ALERT, pc->log, ngx_socket_errno,
@@ -165,7 +165,7 @@ int ngx_event_connect_peer(ngx_peer_conn
         return NGX_ERROR;
     }
 
-#if (WIN32)
+#if (NGX_WIN32)
     /*
      * Winsock assignes a socket number divisible by 4
      * so to find a connection we divide a socket number by 4.
@@ -261,7 +261,7 @@ int ngx_event_connect_peer(ngx_peer_conn
     addr.sin_addr.s_addr = peer->addr;
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pc->log, 0,
-                   "connect to %s, #%d", peer->addr_port_text.data, c->number);
+                   "connect to %V, #%d", &peer->addr_port_text, c->number);
 
     rc = connect(s, (struct sockaddr *) &addr, sizeof(struct sockaddr_in));