comparison src/http/modules/ngx_http_userid_filter_module.c @ 2857:507fc5ac9839

use ngx_connection_local_sockaddr() instead of ngx_http_server_addr()
author Igor Sysoev <igor@sysoev.ru>
date Mon, 18 May 2009 12:58:19 +0000
parents c1975ccd0215
children c7d57b539248
comparison
equal deleted inserted replaced
2856:f9b5dfcc96d8 2857:507fc5ac9839
388 ctx->uid_set[3] = sequencer_v1; 388 ctx->uid_set[3] = sequencer_v1;
389 sequencer_v1 += 0x100; 389 sequencer_v1 += 0x100;
390 390
391 } else { 391 } else {
392 if (conf->service == NGX_CONF_UNSET) { 392 if (conf->service == NGX_CONF_UNSET) {
393 if (ngx_http_server_addr(r, NULL) != NGX_OK) { 393
394 c = r->connection;
395
396 if (ngx_connection_local_sockaddr(c, NULL, 0) != NGX_OK) {
394 return NGX_ERROR; 397 return NGX_ERROR;
395 } 398 }
396
397 c = r->connection;
398 399
399 switch (c->local_sockaddr->sa_family) { 400 switch (c->local_sockaddr->sa_family) {
400 401
401 #if (NGX_HAVE_INET6) 402 #if (NGX_HAVE_INET6)
402 case AF_INET6: 403 case AF_INET6: