summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-10-18 14:27:16 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-10-18 14:27:16 +0000
commitc1484ffa6536aa093d3ad07bb2ae8894ffaee6ef (patch)
treec92de697e86e80b5035082229f27484b9835e956 /src/http/modules
parent37188918ed415ef459ca00872adc7376f84bcd30 (diff)
downloadnginx-c1484ffa6536aa093d3ad07bb2ae8894ffaee6ef.tar.gz
nginx-c1484ffa6536aa093d3ad07bb2ae8894ffaee6ef.tar.bz2
downgrade gravity of getsockname() errors
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_userid_filter_module.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_userid_filter_module.c b/src/http/modules/ngx_http_userid_filter_module.c
index c341a0873..b316630eb 100644
--- a/src/http/modules/ngx_http_userid_filter_module.c
+++ b/src/http/modules/ngx_http_userid_filter_module.c
@@ -348,10 +348,12 @@ ngx_http_userid_set_uid(ngx_http_request_t *r, ngx_http_userid_ctx_t *ctx,
if (r->in_addr == 0) {
slen = sizeof(struct sockaddr_in);
if (getsockname(r->connection->fd,
- (struct sockaddr *) &sin, &slen) == -1)
+ (struct sockaddr *) &sin, &slen)
+ == -1)
{
- ngx_log_error(NGX_LOG_CRIT, r->connection->log,
- ngx_socket_errno, "getsockname() failed");
+ ngx_connection_error(r->connection, ngx_socket_errno,
+ "getsockname() failed");
+ return NGX_ERROR;
}
r->in_addr = sin.sin_addr.s_addr;