mirror of
https://github.com/lxsang/ant-http
synced 2024-11-17 17:08:20 +01:00
fix
This commit is contained in:
parent
44e67913b5
commit
181ee44a51
6
httpd.c
6
httpd.c
@ -52,8 +52,10 @@ void configure_context(SSL_CTX *ctx)
|
||||
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_TICKET);
|
||||
SSL_CTX_set_session_id_context(ctx, (void *)&ssl_session_ctx_id, sizeof(ssl_session_ctx_id));
|
||||
/* Set the key and cert */
|
||||
if (SSL_CTX_use_certificate_file(ctx, server_config.sslcert, SSL_FILETYPE_PEM) <= 0) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
/* use the full chain bundle of certificate */
|
||||
//if (SSL_CTX_use_certificate_file(ctx, server_config.sslcert, SSL_FILETYPE_PEM) <= 0) {
|
||||
if (SSL_CTX_use_certificate_chain_file(ctx, server_config.sslcert) <= 0) {
|
||||
ERR_print_errors_fp(stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -87,10 +87,10 @@ int antd_send(void *src, const void* data, int len)
|
||||
#ifdef USE_OPENSSL
|
||||
}
|
||||
#endif
|
||||
if(ret <= 0)
|
||||
/*if(ret <= 0)
|
||||
{
|
||||
antd_close(src);
|
||||
}
|
||||
}*/
|
||||
return ret;
|
||||
}
|
||||
int antd_recv(void *src, void* data, int len)
|
||||
@ -111,10 +111,10 @@ int antd_recv(void *src, void* data, int len)
|
||||
#ifdef USE_OPENSSL
|
||||
}
|
||||
#endif
|
||||
if(ret == 0)
|
||||
/*if(ret == 0)
|
||||
{
|
||||
antd_close(src);
|
||||
}
|
||||
}*/
|
||||
return ret;
|
||||
}
|
||||
int antd_close(void* src)
|
||||
@ -136,6 +136,7 @@ int antd_close(void* src)
|
||||
server_config.connection--;
|
||||
LOG("Remaining connection %d\n", server_config.connection);
|
||||
free(src);
|
||||
src = NULL;
|
||||
return ret;
|
||||
}
|
||||
int __ti(void* client,int data)
|
||||
|
Loading…
Reference in New Issue
Block a user