fixed missing urs deactivation upon initialization failure

This commit is contained in:
hyung-hwan 2014-09-16 05:31:28 +00:00
parent 2ca7afd90c
commit 3a30d67411
2 changed files with 3 additions and 1 deletions

View File

@ -2194,7 +2194,7 @@ static void impede_httpd (qse_httpd_t* httpd)
httpd_xtn = qse_httpd_getxtnstd (httpd);
if (open_config_file (httpd) >= 0)
{
{
qse_httpd_server_t* server;
server = qse_httpd_getfirstserver (httpd);

View File

@ -1690,12 +1690,14 @@ int qse_httpd_loop (qse_httpd_t* httpd)
if (activate_servers (httpd) <= -1)
{
if (httpd->dnsactive) deactivate_dns (httpd);
if (httpd->ursactive) deactivate_urs (httpd);
httpd->opt.scb.mux.close (httpd, httpd->mux);
return -1;
}
if (httpd->server.nactive <= 0)
{
if (httpd->dnsactive) deactivate_dns (httpd);
if (httpd->ursactive) deactivate_urs (httpd);
httpd->opt.scb.mux.close (httpd, httpd->mux);
httpd->errnum = QSE_HTTPD_ENOSVR;