Mercurial > hg > nginx-quic
comparison src/http/ngx_http_variables.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 | 2f3c80ff2123 |
children | 8535736ace1a |
comparison
equal
deleted
inserted
replaced
2856:f9b5dfcc96d8 | 2857:507fc5ac9839 |
---|---|
936 u_char addr[NGX_SOCKADDR_STRLEN]; | 936 u_char addr[NGX_SOCKADDR_STRLEN]; |
937 | 937 |
938 s.len = NGX_SOCKADDR_STRLEN; | 938 s.len = NGX_SOCKADDR_STRLEN; |
939 s.data = addr; | 939 s.data = addr; |
940 | 940 |
941 if (ngx_http_server_addr(r, &s) != NGX_OK) { | 941 if (ngx_connection_local_sockaddr(r->connection, &s, 0) != NGX_OK) { |
942 return NGX_ERROR; | 942 return NGX_ERROR; |
943 } | 943 } |
944 | 944 |
945 s.data = ngx_pnalloc(r->pool, s.len); | 945 s.data = ngx_pnalloc(r->pool, s.len); |
946 if (s.data == NULL) { | 946 if (s.data == NULL) { |
972 v->len = 0; | 972 v->len = 0; |
973 v->valid = 1; | 973 v->valid = 1; |
974 v->no_cacheable = 0; | 974 v->no_cacheable = 0; |
975 v->not_found = 0; | 975 v->not_found = 0; |
976 | 976 |
977 if (ngx_http_server_addr(r, NULL) != NGX_OK) { | 977 if (ngx_connection_local_sockaddr(r->connection, NULL, 0) != NGX_OK) { |
978 return NGX_ERROR; | 978 return NGX_ERROR; |
979 } | 979 } |
980 | 980 |
981 v->data = ngx_pnalloc(r->pool, sizeof("65535") - 1); | 981 v->data = ngx_pnalloc(r->pool, sizeof("65535") - 1); |
982 if (v->data == NULL) { | 982 if (v->data == NULL) { |