# HG changeset patch # User 吕海涛 <0...@lvht.net> # Date 1493595577 -28800 # Mon May 01 07:39:37 2017 +0800 # Node ID 2ddd0894c1a6c7efe45310b874a5b4091b58bb81 # Parent f38647c651a8d5c884b5aacc9f9a5b1af196309b Http: make ngx_http_init_listening a public api
Make this api public is a good convenience to allow other module add listening port to http server dynamically. diff -r f38647c651a8 -r 2ddd0894c1a6 src/http/ngx_http.c --- a/src/http/ngx_http.c Thu Apr 27 16:57:18 2017 +0300 +++ b/src/http/ngx_http.c Mon May 01 07:39:37 2017 +0800 @@ -55,8 +55,6 @@ static ngx_int_t ngx_http_cmp_conf_addrs static int ngx_libc_cdecl ngx_http_cmp_dns_wildcards(const void *one, const void *two); -static ngx_int_t ngx_http_init_listening(ngx_conf_t *cf, - ngx_http_conf_port_t *port); static ngx_listening_t *ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr); static ngx_int_t ngx_http_add_addrs(ngx_conf_t *cf, ngx_http_port_t *hport, @@ -1623,7 +1621,7 @@ ngx_http_cmp_dns_wildcards(const void *o } -static ngx_int_t +ngx_int_t ngx_http_init_listening(ngx_conf_t *cf, ngx_http_conf_port_t *port) { ngx_uint_t i, last, bind_wildcard; diff -r f38647c651a8 -r 2ddd0894c1a6 src/http/ngx_http.h --- a/src/http/ngx_http.h Thu Apr 27 16:57:18 2017 +0300 +++ b/src/http/ngx_http.h Mon May 01 07:39:37 2017 +0800 @@ -80,6 +80,7 @@ ngx_int_t ngx_http_add_location(ngx_conf ngx_http_core_loc_conf_t *clcf); ngx_int_t ngx_http_add_listen(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, ngx_http_listen_opt_t *lsopt); +ngx_int_t ngx_http_init_listening(ngx_conf_t *cf, ngx_http_conf_port_t *port); void ngx_http_init_connection(ngx_connection_t *c); _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel