Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_userid_filter_module.c @ 788:ff16489f1eac
downgrade gravity of getsockname() errors
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 18 Oct 2006 14:27:16 +0000 |
parents | 7e24168b0853 |
children | 3b763d36e055 |
comparison
equal
deleted
inserted
replaced
787:b310630d129e | 788:ff16489f1eac |
---|---|
346 } else { | 346 } else { |
347 if (conf->service == NGX_CONF_UNSET) { | 347 if (conf->service == NGX_CONF_UNSET) { |
348 if (r->in_addr == 0) { | 348 if (r->in_addr == 0) { |
349 slen = sizeof(struct sockaddr_in); | 349 slen = sizeof(struct sockaddr_in); |
350 if (getsockname(r->connection->fd, | 350 if (getsockname(r->connection->fd, |
351 (struct sockaddr *) &sin, &slen) == -1) | 351 (struct sockaddr *) &sin, &slen) |
352 == -1) | |
352 { | 353 { |
353 ngx_log_error(NGX_LOG_CRIT, r->connection->log, | 354 ngx_connection_error(r->connection, ngx_socket_errno, |
354 ngx_socket_errno, "getsockname() failed"); | 355 "getsockname() failed"); |
356 return NGX_ERROR; | |
355 } | 357 } |
356 | 358 |
357 r->in_addr = sin.sin_addr.s_addr; | 359 r->in_addr = sin.sin_addr.s_addr; |
358 } | 360 } |
359 | 361 |