修改cache-client依赖hiredis(修改版)的CMakeList.txt,编译通过。
This commit is contained in:
@@ -1057,8 +1057,8 @@ void cache_pending(const struct tfe_http_session * session, unsigned int thread_
|
||||
case PENDING_RESULT_ALLOWED:
|
||||
case PENDING_RESULT_FOBIDDEN:
|
||||
case PENDING_RESULT_MISS:
|
||||
future_destroy(ctx->f_cache_query);
|
||||
ctx->f_cache_query=NULL;
|
||||
future_destroy(ctx->f_cache_pending);
|
||||
ctx->f_cache_pending=NULL;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1068,9 +1068,17 @@ void cache_pending(const struct tfe_http_session * session, unsigned int thread_
|
||||
void cache_query(const struct tfe_http_session * session, unsigned int thread_id, struct pangu_http_ctx * ctx)
|
||||
{
|
||||
ctx->f_cache_query=future_create("cache_get", cache_query_on_succ, cache_query_on_fail, ctx);
|
||||
ctx->ref_session=tfe_http_session_allow_write(session);
|
||||
tfe_http_session_suspend(ctx->ref_session);
|
||||
web_cache_async_query(g_pangu_rt->cache, thread_id, session->req, ctx->f_cache_query);
|
||||
int ret=web_cache_async_query(g_pangu_rt->cache, thread_id, session->req, ctx->f_cache_query);
|
||||
if(ret==0)
|
||||
{
|
||||
ctx->ref_session=tfe_http_session_allow_write(session);
|
||||
tfe_http_session_suspend(ctx->ref_session);
|
||||
}
|
||||
else
|
||||
{
|
||||
future_destroy(ctx->f_cache_query);
|
||||
ctx->f_cache_query=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void cache_update(const struct tfe_http_session * session, enum tfe_http_event events,
|
||||
|
||||
Reference in New Issue
Block a user