88 newls->nacceptors = conf->nacceptors; |
88 newls->nacceptors = conf->nacceptors; |
89 newls->default_vs.vs_name = conf->vs.ptr; |
89 newls->default_vs.vs_name = conf->vs.ptr; |
90 newls->port = fl->port; |
90 newls->port = fl->port; |
91 newls->server_socket = fl->server_socket; |
91 newls->server_socket = fl->server_socket; |
92 newls->running = 1; |
92 newls->running = 1; |
|
93 newls->threadpool = NULL; |
93 newls->ref = 2; // 1 reference is fl->next |
94 newls->ref = 2; // 1 reference is fl->next |
94 |
95 |
95 newls->session_handler = fl->session_handler; // TODO |
96 newls->session_handler = fl->session_handler; // TODO |
96 |
97 |
97 // the listener threadpool might be changed |
98 // the listener threadpool might be changed |
142 HttpListener *listener = malloc(sizeof(HttpListener)); |
143 HttpListener *listener = malloc(sizeof(HttpListener)); |
143 listener->running = 0; |
144 listener->running = 0; |
144 listener->cfg = conf->cfg; |
145 listener->cfg = conf->cfg; |
145 listener->name = conf->name; |
146 listener->name = conf->name; |
146 listener->default_vs.vs_name = conf->vs.ptr; |
147 listener->default_vs.vs_name = conf->vs.ptr; |
|
148 listener->threadpool = NULL; |
147 if(conf->threadpool.ptr != NULL) { |
149 if(conf->threadpool.ptr != NULL) { |
148 listener->threadpool = get_threadpool(conf->threadpool); |
150 listener->threadpool = get_threadpool(conf->threadpool); |
149 } |
151 } |
150 if(listener->threadpool == NULL) { |
152 if(listener->threadpool == NULL) { |
151 listener->threadpool = get_default_threadpool(); |
153 listener->threadpool = get_default_threadpool(); |