From f6078dc27e07c2c0263a50ef244988e93402b908 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 10 Apr 2023 15:11:54 +0800 Subject: [PATCH] chore: more code --- include/client/taos.h | 2 +- source/client/src/clientMain.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/client/taos.h b/include/client/taos.h index 530b40f5aa..73086ce666 100644 --- a/include/client/taos.h +++ b/include/client/taos.h @@ -123,7 +123,7 @@ typedef enum { } SET_CONF_RET_CODE; typedef enum { - TAOS_NOTIFY_PASSVER = 1, + TAOS_NOTIFY_PASSVER = 0, } TAOS_NOTIFY_TYPE; #define RET_MSG_LENGTH 1024 diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 3969e7e771..a216b2afb2 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -131,7 +131,15 @@ int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t *fp, void *param) { return -1; } - pObj->passInfo.fp = fp; + int32_t type = param ? *(int32_t *)param : 0; + switch (type) { + case TAOS_NOTIFY_PASSVER: { + pObj->passInfo.fp = fp; + break; + } + default: + break; + } releaseTscObj(*(int64_t *)taos); return 0; -- GitLab