mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2024-10-30 09:10:47 +03:00
Log a message stating that TLS is disabled if the config requests it.
This commit is contained in:
parent
c5cfdb9894
commit
11a7b6653d
1 changed files with 6 additions and 1 deletions
|
@ -292,17 +292,21 @@ HttpServerCreate(HttpServerConfig * config)
|
|||
|
||||
if (!config)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!config->handler)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef TLS_IMPL
|
||||
if (config->flags & HTTP_FLAG_TLS)
|
||||
{
|
||||
Log(LOG_ERR, "TLS support is disabled.");
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
@ -318,6 +322,7 @@ HttpServerCreate(HttpServerConfig * config)
|
|||
server->config = *config;
|
||||
server->config.tlsCert = StrDuplicate(config->tlsCert);
|
||||
server->config.tlsKey = StrDuplicate(config->tlsKey);
|
||||
server->sd = -1;
|
||||
|
||||
server->threadPool = ArrayCreate();
|
||||
if (!server->threadPool)
|
||||
|
@ -396,7 +401,7 @@ error:
|
|||
ArrayFree(server->threadPool);
|
||||
}
|
||||
|
||||
if (server->sd)
|
||||
if (server->sd > -1)
|
||||
{
|
||||
close(server->sd);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue