Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 1506:1a1fe29fdb17 stable-0.5
r1378 merge:
set default listen() backlog to 511 on all platforms except FreeBSD
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 22 Sep 2007 18:59:05 +0000 |
parents | ec4d58ab30ea |
children | 2abedb6c0f29 |
comparison
equal
deleted
inserted
replaced
1505:f552535e259b | 1506:1a1fe29fdb17 |
---|---|
2224 /* STUB: getuid() should be cached */ | 2224 /* STUB: getuid() should be cached */ |
2225 ls->port = (getuid() == 0) ? 80 : 8000; | 2225 ls->port = (getuid() == 0) ? 80 : 8000; |
2226 #endif | 2226 #endif |
2227 ls->family = AF_INET; | 2227 ls->family = AF_INET; |
2228 | 2228 |
2229 ls->conf.backlog = -1; | 2229 ls->conf.backlog = NGX_LISTEN_BACKLOG; |
2230 ls->conf.rcvbuf = -1; | 2230 ls->conf.rcvbuf = -1; |
2231 ls->conf.sndbuf = -1; | 2231 ls->conf.sndbuf = -1; |
2232 } | 2232 } |
2233 | 2233 |
2234 if (conf->server_name.data == NULL) { | 2234 if (conf->server_name.data == NULL) { |
2575 ls->family = AF_INET; | 2575 ls->family = AF_INET; |
2576 ls->addr = u.addr.in_addr; | 2576 ls->addr = u.addr.in_addr; |
2577 ls->port = u.port; | 2577 ls->port = u.port; |
2578 ls->file_name = cf->conf_file->file.name; | 2578 ls->file_name = cf->conf_file->file.name; |
2579 ls->line = cf->conf_file->line; | 2579 ls->line = cf->conf_file->line; |
2580 ls->conf.backlog = -1; | 2580 ls->conf.backlog = NGX_LISTEN_BACKLOG; |
2581 ls->conf.rcvbuf = -1; | 2581 ls->conf.rcvbuf = -1; |
2582 ls->conf.sndbuf = -1; | 2582 ls->conf.sndbuf = -1; |
2583 | 2583 |
2584 n = ngx_inet_ntop(AF_INET, &ls->addr, ls->conf.addr, INET_ADDRSTRLEN + 6); | 2584 n = ngx_inet_ntop(AF_INET, &ls->addr, ls->conf.addr, INET_ADDRSTRLEN + 6); |
2585 ngx_sprintf(&ls->conf.addr[n], ":%ui", ls->port); | 2585 ngx_sprintf(&ls->conf.addr[n], ":%ui", ls->port); |