-int start_http_listener(void)
-{
- char hp[128] = "";
- struct conf_server *ser = global_parameters.server;
-
- if (*global_parameters.listener_override)
- strcpy(hp, global_parameters.listener_override);
- else
- {
- strcpy(hp, ser->host ? ser->host : "");
- if (ser->port)
- {
- if (*hp)
- strcat(hp, ":");
- sprintf(hp + strlen(hp), "%d", ser->port);
- }
- }
- return http_init(hp);
-}
-
-void start_proxy(void)
-{
- char hp[128] = "";
- struct conf_server *ser = global_parameters.server;
-
- if (*global_parameters.proxy_override)
- strcpy(hp, global_parameters.proxy_override);
- else if (ser->proxy_host || ser->proxy_port)
- {
- strcpy(hp, ser->proxy_host ? ser->proxy_host : "");
- if (ser->proxy_port)
- {
- if (*hp)
- strcat(hp, ":");
- sprintf(hp + strlen(hp), "%d", ser->proxy_port);
- }
- }
- else
- return;
-
- http_set_proxyaddr(hp, ser->myurl ? ser->myurl : "");
-}
-