修正suspend/resume语义实现的若干问题,增加自行构建request/response的header标志

This commit is contained in:
Lu Qiuwen
2018-10-26 20:30:06 +08:00
parent d3d34355ef
commit cf64f01f7f
9 changed files with 104 additions and 35 deletions

View File

@@ -432,7 +432,7 @@ static void cache_query_meta_on_succ(future_result_t * result, void * user)
struct cache_pending_context* ctx=(struct cache_pending_context*)promise_get_ctx(p);
struct tango_cache_result* _result=tango_cache_read_result(result);
ctx->ref_tango_cache_result=_result;
time_t cache_last_modified_time=0, request_last_modified_time=0;
switch(_result->type)
{
case RESULT_TYPE_HEADER:
@@ -690,9 +690,14 @@ void web_cache_update(struct cache_update_context* ctx, const unsigned char * bo
}
void web_cache_update_end(struct cache_update_context* ctx)
{
fprintf(stderr, "------- web_cache_update_end , %p\n", ctx);
tango_cache_update_end(ctx->write_ctx);
ATOMIC_DEC(&(ctx->ref_cache_handle->stat_val[STAT_CACHE_UPLOADING]));
ctx->write_ctx = NULL;
ctx->ref_cache_handle = NULL;
free(ctx);
ATOMIC_DEC(&(ctx->ref_cache_handle->stat_val[STAT_CACHE_UPLOADING]));
return;
}