[nginx] svn commit: r4803 - in branches/stable-1.2: . src/http

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Aug 6 17:20:01 UTC 2012


Author: mdounin
Date: 2012-08-06 17:20:01 +0000 (Mon, 06 Aug 2012)
New Revision: 4803
URL: http://trac.nginx.org/nginx/changeset/4803/nginx

Log:
Merge of r4766, r4767: ngx_http_upstream_add() changes.

*) Fixed to return NULL if an error occurs.

*) Microoptimization: replaced an expression known to be constant with
   the constant value.


Modified:
   branches/stable-1.2/
   branches/stable-1.2/src/http/ngx_http_upstream.c

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2	2012-08-06 17:15:23 UTC (rev 4802)
+++ branches/stable-1.2	2012-08-06 17:20:01 UTC (rev 4803)

Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4738,4740-4741,4754,4756-4765,4768
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4738,4740-4741,4754,4756-4768
\ No newline at end of property
Modified: branches/stable-1.2/src/http/ngx_http_upstream.c
===================================================================
--- branches/stable-1.2/src/http/ngx_http_upstream.c	2012-08-06 17:15:23 UTC (rev 4802)
+++ branches/stable-1.2/src/http/ngx_http_upstream.c	2012-08-06 17:20:01 UTC (rev 4803)
@@ -4422,18 +4422,18 @@
         uscf->servers = ngx_array_create(cf->pool, 1,
                                          sizeof(ngx_http_upstream_server_t));
         if (uscf->servers == NULL) {
-            return NGX_CONF_ERROR;
+            return NULL;
         }
 
         us = ngx_array_push(uscf->servers);
         if (us == NULL) {
-            return NGX_CONF_ERROR;
+            return NULL;
         }
 
         ngx_memzero(us, sizeof(ngx_http_upstream_server_t));
 
         us->addrs = u->addrs;
-        us->naddrs = u->naddrs;
+        us->naddrs = 1;
     }
 
     uscfp = ngx_array_push(&umcf->upstreams);



More information about the nginx-devel mailing list