chore: more code

This commit is contained in:
kailixu 2023-04-10 15:11:54 +08:00
parent 76386b9fad
commit f6078dc27e
2 changed files with 10 additions and 2 deletions

View File

@ -123,7 +123,7 @@ typedef enum {
} SET_CONF_RET_CODE; } SET_CONF_RET_CODE;
typedef enum { typedef enum {
TAOS_NOTIFY_PASSVER = 1, TAOS_NOTIFY_PASSVER = 0,
} TAOS_NOTIFY_TYPE; } TAOS_NOTIFY_TYPE;
#define RET_MSG_LENGTH 1024 #define RET_MSG_LENGTH 1024

View File

@ -131,7 +131,15 @@ int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t *fp, void *param) {
return -1; 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); releaseTscObj(*(int64_t *)taos);
return 0; return 0;