diff src/http/ngx_http_core_module.c @ 302:9b7db0df50f0 NGINX_0_5_21

nginx 0.5.21 *) Bugfix: if server has more than about ten locations, then regex locations might be choosen not in that order as they were specified. *) Bugfix: a worker process may got caught in an endless loop on 64-bit platform, if the 33-rd or next in succession backend has failed. Thanks to Anton Povarov. *) Bugfix: a bus error might occur on Solaris/sparc64 if the PCRE library was used. Thanks to Andrei Nigmatulin. *) Bugfix: in the HTTPS protocol in the "proxy_pass" directive.
author Igor Sysoev <http://sysoev.ru>
date Mon, 28 May 2007 00:00:00 +0400
parents cba14c1e2a4b
children 94e16de3c33f
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -45,8 +45,7 @@ static char *ngx_http_core_server(ngx_co
     void *dummy);
 static char *ngx_http_core_location(ngx_conf_t *cf, ngx_command_t *cmd,
     void *dummy);
-static int ngx_libc_cdecl ngx_http_core_cmp_locations(const void *first,
-    const void *second);
+static int ngx_http_core_cmp_locations(const void *first, const void *second);
 
 static char *ngx_http_core_types(ngx_conf_t *cf, ngx_command_t *cmd,
     void *conf);
@@ -1642,8 +1641,8 @@ ngx_http_core_server(ngx_conf_t *cf, ngx
         return rv;
     }
 
-    ngx_qsort(cscf->locations.elts, (size_t) cscf->locations.nelts,
-              sizeof(ngx_http_core_loc_conf_t *), ngx_http_core_cmp_locations);
+    ngx_sort(cscf->locations.elts, (size_t) cscf->locations.nelts,
+             sizeof(ngx_http_core_loc_conf_t *), ngx_http_core_cmp_locations);
 
     return rv;
 }
@@ -1774,10 +1773,10 @@ ngx_http_core_location(ngx_conf_t *cf, n
 #if (NGX_PCRE)
         if (clcf->regex == NULL
             && ngx_strncmp(clcf->name.data, pclcf->name.data, pclcf->name.len)
-                                                                         != 0)
+               != 0)
 #else
         if (ngx_strncmp(clcf->name.data, pclcf->name.data, pclcf->name.len)
-                                                                         != 0)
+            != 0)
 #endif
         {
             ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
@@ -1814,14 +1813,14 @@ ngx_http_core_location(ngx_conf_t *cf, n
         return rv;
     }
 
-    ngx_qsort(clcf->locations.elts, (size_t) clcf->locations.nelts,
-              sizeof(ngx_http_core_loc_conf_t *), ngx_http_core_cmp_locations);
+    ngx_sort(clcf->locations.elts, (size_t) clcf->locations.nelts,
+             sizeof(ngx_http_core_loc_conf_t *), ngx_http_core_cmp_locations);
 
     return rv;
 }
 
 
-static int ngx_libc_cdecl
+static int
 ngx_http_core_cmp_locations(const void *one, const void *two)
 {
     ngx_int_t                  rc;