[1]统一GET/PUT结束后结果通知机制,API直接调用失败时不回调,其他情况回调(promise);

[2]hiredis版本确定为0.14.0版;
[3]修复tango_cache_ctx_destroy中TAILQ内存释放的BUG;
This commit is contained in:
zhangchengwei
2018-10-27 11:03:58 +08:00
committed by zhengchao
parent 4bb03d6e38
commit e1ad321332
11 changed files with 150 additions and 90 deletions

View File

@@ -11,7 +11,7 @@
#include <hiredis/hiredis.h>
#include <hiredis/async.h>
#include <hiredis/adapters/libevent.h>
#include <cjson/cJSON.h>
#include <cJSON/cJSON.h>
#include "tango_cache_transfer.h"
#include "tango_cache_tools.h"
@@ -39,7 +39,7 @@ struct http_hdr_name g_http_hdr_name[HDR_CONTENT_NUM]=
{"content-md5", "Content-MD5: "}
};
void redis_asyn_disconnect_cb(const struct redisAsyncContext *ac, int status)
static void redis_asyn_disconnect_cb(const struct redisAsyncContext *ac, int status)
{
struct tango_cache_instance *instance = (struct tango_cache_instance *)redisAsyncGetConnectionData(ac);
@@ -54,7 +54,7 @@ void redis_asyn_disconnect_cb(const struct redisAsyncContext *ac, int status)
instance->redis_connecting = CACHE_REDIS_DISCONNECTED;
}
void redis_asyn_connect_cb(const struct redisAsyncContext *ac, int status)
static void redis_asyn_connect_cb(const struct redisAsyncContext *ac, int status)
{
struct tango_cache_instance *instance = (struct tango_cache_instance *)redisAsyncGetConnectionData(ac);
@@ -85,7 +85,7 @@ int redis_asyn_connect_init(struct tango_cache_instance *instance)
return 0;
}
int parse_minio_events_json(struct tango_cache_ctx *ctx, const char *jcontent)
static int parse_minio_events_json(struct tango_cache_ctx *ctx, const char *jcontent)
{
cJSON *root, *pobject = NULL, *ptarget, *plastMod, *pexpires;
int ret = PARSE_JSON_RET_ERROR;
@@ -160,7 +160,7 @@ out_json:
return ret;
}
void redis_hget_command_cb(struct redisAsyncContext *ac, void *vreply, void *privdata)
static void redis_hget_command_cb(struct redisAsyncContext *ac, void *vreply, void *privdata)
{
redisReply *reply = (redisReply *)vreply;
struct tango_cache_ctx *ctx = (struct tango_cache_ctx *)privdata;