Close #132 获取downstream session cache时,错误传参。
This commit is contained in:
@@ -268,14 +268,15 @@ void down_session_set(struct sess_cache * cache, const SSL_SESSION * sess)
|
||||
|
||||
SSL_SESSION * down_session_get(struct sess_cache * cache, const unsigned char * id, int idlen)
|
||||
{
|
||||
SSL_SESSION * sess = NULL;
|
||||
struct sess_get_args result;
|
||||
memset(&result, 0, sizeof(result));
|
||||
long cb_ret = 0;
|
||||
assert(cache->served_for == CONN_DIR_DOWNSTREAM);
|
||||
MESA_htable_search_cb(cache->hash, id, (unsigned int) idlen, sess_cache_get_cb, &sess, &cb_ret);
|
||||
MESA_htable_search_cb(cache->hash, id, (unsigned int) idlen, sess_cache_get_cb, &result, &cb_ret);
|
||||
if (cb_ret == SESS_CACHE_FOUND)
|
||||
{
|
||||
ATOMIC_INC(&(cache->hit_cnt));
|
||||
return sess;
|
||||
return result.sess;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user