消除tfe_utils.之外的编译警告
This commit is contained in:
@@ -365,7 +365,7 @@ struct ssl_mgr * ssl_manager_init(const char * ini_profile, const char * section
|
||||
{
|
||||
struct timeval gc_delay = {0, 500*1000}; //Microseconds, we set 500 miliseconds here.
|
||||
struct ssl_mgr * mgr = ALLOC(struct ssl_mgr, 1);
|
||||
int ret = 0, value = 0;
|
||||
int ret = 0;
|
||||
char version_str[TFE_SYMBOL_MAX];
|
||||
mgr->logger = logger;
|
||||
mgr->ev_base_gc=ev_base_gc;
|
||||
@@ -498,10 +498,7 @@ static void peek_client_hello_cb(evutil_socket_t fd, short what, void * arg)
|
||||
struct promise * promise = (struct promise *) arg;
|
||||
//use promise_get_ctx instead of promise_dettach_ctx for try more times.
|
||||
struct peek_client_hello_ctx * ctx = (struct peek_client_hello_ctx *) promise_get_ctx(promise);
|
||||
const char * reason_too_many_retries = "too many tries";
|
||||
const char * reason_see_no_client_hello = "see no client hello";
|
||||
const char * reason = NULL;
|
||||
char * sni = NULL;
|
||||
unsigned char buf[1024];
|
||||
ssize_t n = 0;
|
||||
const unsigned char * chello = NULL;
|
||||
@@ -1097,7 +1094,7 @@ void query_cert_ctx_free(struct ask_keyring_ctx * ctx)
|
||||
future_destroy(ctx->f_query_cert);
|
||||
ctx->f_query_cert = NULL;
|
||||
}
|
||||
|
||||
//on success, bev_down and downstream has been transfered to caller by release**
|
||||
if (ctx->bev_down != NULL)
|
||||
{
|
||||
bufferevent_free(ctx->bev_down);
|
||||
@@ -1137,15 +1134,15 @@ void ask_keyring_on_succ(void * result, void * user)
|
||||
struct promise * p = (struct promise *) user;
|
||||
struct ask_keyring_ctx * ctx = (struct ask_keyring_ctx *) promise_dettach_ctx(p);
|
||||
|
||||
struct ssl_stream * downstream = NULL;
|
||||
struct keyring * kyr = NULL;
|
||||
|
||||
struct ssl_mgr * mgr = ctx->ssl_mgr;
|
||||
|
||||
|
||||
|
||||
kyr = key_keeper_release_keyring(result); //kyr will be freed at ssl downstream closing.
|
||||
future_destroy(ctx->f_query_cert);
|
||||
ctx->f_query_cert = NULL;
|
||||
|
||||
kyr = key_keeper_release_keyring(result); //kyr will be freed at ssl downstream closing.
|
||||
ctx->downstream = ssl_stream_new(mgr, ctx->fd_downstream, CONN_DIR_DOWNSTREAM, NULL, kyr);
|
||||
ctx->bev_down = bufferevent_openssl_socket_new(ctx->evbase, ctx->fd_downstream, ctx->downstream->ssl,
|
||||
BUFFEREVENT_SSL_CONNECTING, BEV_OPT_DEFER_CALLBACKS);
|
||||
@@ -1292,14 +1289,15 @@ retry:
|
||||
if (ctx->ev)
|
||||
{
|
||||
event_add(ctx->ev, &retry_delay);
|
||||
return;
|
||||
}
|
||||
|
||||
TFE_LOG_ERROR(logger, "Failed to shutdown SSL connection cleanly: "
|
||||
else
|
||||
{
|
||||
TFE_LOG_ERROR(logger, "Failed to shutdown SSL connection cleanly: "
|
||||
"Cannot create event. Closing fd.\n");
|
||||
|
||||
}
|
||||
return;
|
||||
complete:
|
||||
if(ctx->s_stream->dir=CONN_DIR_DOWNSTREAM)
|
||||
if(ctx->s_stream->dir==CONN_DIR_DOWNSTREAM)
|
||||
{
|
||||
ATOMIC_INC(&(ctx->s_stream->mgr->stat_val[SSL_DOWN_CLOSED]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user