Mercurial > hg > nginx
comparison src/core/ngx_inet.c @ 2517:095f28fc0c4a
fix upstream port, introduced in r2513
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 21 Feb 2009 14:34:32 +0000 |
parents | 2e91aecb9e57 |
children | a472d954c534 |
comparison
equal
deleted
inserted
replaced
2516:52ce03b3ad18 | 2517:095f28fc0c4a |
---|---|
702 | 702 |
703 (void) ngx_cpystrn(host, u->host.data, u->host.len + 1); | 703 (void) ngx_cpystrn(host, u->host.data, u->host.len + 1); |
704 | 704 |
705 /* AF_INET only */ | 705 /* AF_INET only */ |
706 | 706 |
707 sin = (struct sockaddr_in *) &u->sockaddr; | 707 port = htons(u->port); |
708 port = sin->sin_port; | |
709 | 708 |
710 in_addr = inet_addr((char *) host); | 709 in_addr = inet_addr((char *) host); |
711 | 710 |
712 if (in_addr == INADDR_NONE) { | 711 if (in_addr == INADDR_NONE) { |
713 h = gethostbyname((char *) host); | 712 h = gethostbyname((char *) host); |