summaryrefslogtreecommitdiff
path: root/src/http
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-05-28 14:56:45 +0000
committerJonathan Kolb <jon@b0g.us>2007-05-28 14:56:45 +0000
commit7b2348282df005c03f11798b5d64cf9c13c35518 (patch)
treec929c61be3d02e967e4d196a37acdfc52f2f6ef9 /src/http
parentd7127be32835b36710aee355677f37777046bd13 (diff)
downloadnginx-7b2348282df005c03f11798b5d64cf9c13c35518.tar.gz
Changes with nginx 0.5.21 28 May 2007v0.5.21
*) Bugfix: if server has more than about ten locations, then regex locations may 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.
Diffstat (limited to 'src/http')
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/http/ngx_http.c9
-rw-r--r--src/http/ngx_http_core_module.c17
-rw-r--r--src/http/ngx_http_upstream_round_robin.c4
4 files changed, 15 insertions, 17 deletions
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index d6f47c078..dd75ec8e3 100644
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -47,7 +47,7 @@ our @EXPORT = qw(
HTTP_INSUFFICIENT_STORAGE
);
-our $VERSION = '0.5.20';
+our $VERSION = '0.5.21';
require XSLoader;
XSLoader::load('nginx', $VERSION);
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 7a1eb89b3..46e576a90 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -19,8 +19,7 @@ static ngx_int_t ngx_http_add_names(ngx_conf_t *cf,
static char *ngx_http_merge_locations(ngx_conf_t *cf,
ngx_array_t *locations, void **loc_conf, ngx_http_module_t *module,
ngx_uint_t ctx_index);
-static int ngx_libc_cdecl ngx_http_cmp_conf_in_addrs(const void *one,
- const void *two);
+static int ngx_http_cmp_conf_in_addrs(const void *one, const void *two);
static int ngx_libc_cdecl ngx_http_cmp_dns_wildcards(const void *one,
const void *two);
@@ -599,8 +598,8 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
in_port = in_ports.elts;
for (p = 0; p < in_ports.nelts; p++) {
- ngx_qsort(in_port[p].addrs.elts, (size_t) in_port[p].addrs.nelts,
- sizeof(ngx_http_conf_in_addr_t), ngx_http_cmp_conf_in_addrs);
+ ngx_sort(in_port[p].addrs.elts, (size_t) in_port[p].addrs.nelts,
+ sizeof(ngx_http_conf_in_addr_t), ngx_http_cmp_conf_in_addrs);
/*
* check whether all name-based servers have the same configuraiton
@@ -1027,7 +1026,7 @@ ngx_http_merge_locations(ngx_conf_t *cf, ngx_array_t *locations,
}
-static int ngx_libc_cdecl
+static int
ngx_http_cmp_conf_in_addrs(const void *one, const void *two)
{
ngx_http_conf_in_addr_t *first, *second;
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index dd7ffc0f3..2334f6daa 100644
--- 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_conf_t *cf, ngx_command_t *cmd,
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_command_t *cmd, void *dummy)
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, ngx_command_t *cmd, void *dummy)
#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, ngx_command_t *cmd, void *dummy)
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;
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
index 359a73624..b54e7a72d 100644
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -215,7 +215,7 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
rrp->current = rrp->peers->current;
n = rrp->current / (8 * sizeof(uintptr_t));
- m = 1 << rrp->current % (8 * sizeof(uintptr_t));
+ m = (uintptr_t) 1 << rrp->current % (8 * sizeof(uintptr_t));
if (!(rrp->tried[n] & m)) {
peer = &rrp->peers->peer[rrp->current];
@@ -268,7 +268,7 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
} else {
for ( ;; ) {
n = rrp->current / (8 * sizeof(uintptr_t));
- m = 1 << rrp->current % (8 * sizeof(uintptr_t));
+ m = (uintptr_t) 1 << rrp->current % (8 * sizeof(uintptr_t));
if (!(rrp->tried[n] & m)) {