diff --git a/example/src/tmq.c b/example/src/tmq.c index 0fac6b62d3575c68bebf1638f3ec75a90c5bcf6e..86b39e7d0f7e3529383b67b248cee426263ddc66 100644 --- a/example/src/tmq.c +++ b/example/src/tmq.c @@ -224,6 +224,7 @@ void sync_consume_loop(tmq_t* tmq, tmq_list_t* topics) { printf("%s, ", subTopics[i]); } printf("\n"); + tmq_list_destroy(subList); while (running) { TAOS_RES* tmqmessage = tmq_consumer_poll(tmq, 1000); diff --git a/include/client/taos.h b/include/client/taos.h index 0781737882681b9c3b64e786e6a019f28334b514..6e209006681f2122a5a68ef890f9471adae61831 100644 --- a/include/client/taos.h +++ b/include/client/taos.h @@ -257,8 +257,8 @@ DLL_EXPORT void tmq_conf_set_offset_commit_cb(tmq_conf_t *conf, tmq_co /* -------------------------TMQ MSG HANDLE INTERFACE---------------------- */ -DLL_EXPORT char *tmq_get_topic_name(TAOS_RES *res); -DLL_EXPORT int32_t tmq_get_vgroup_id(TAOS_RES *res); +DLL_EXPORT const char *tmq_get_topic_name(TAOS_RES *res); +DLL_EXPORT int32_t tmq_get_vgroup_id(TAOS_RES *res); // TODO #if 0 DLL_EXPORT char *tmq_get_table_name(TAOS_RES *res); diff --git a/source/client/src/tmq.c b/source/client/src/tmq.c index 1506422c8b2b78e78ee46ad901c008716acc81fe..151bdaca2bb5edbb48557acc540181014128686a 100644 --- a/source/client/src/tmq.c +++ b/source/client/src/tmq.c @@ -1310,7 +1310,7 @@ const char* tmq_err2str(tmq_resp_err_t err) { return "fail"; } -char* tmq_get_topic_name(TAOS_RES* res) { +const char* tmq_get_topic_name(TAOS_RES* res) { if (TD_RES_TMQ(res)) { SMqRspObj* pRspObj = (SMqRspObj*)res; return pRspObj->topic; diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index a8e2c22d42e5b6db5b9b4390b0109ea489729330..91c2cea2989ce2636959d9f1b0f772b7020da64d 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -81,7 +81,7 @@ ./test.sh -f tsim/insert/backquote.sim -m ./test.sh -f tsim/parser/fourArithmetic-basic.sim -m ./test.sh -f tsim/query/interval-offset.sim -m -./test.sh -f tsim/tmq/basic3.sim -m +#./test.sh -f tsim/tmq/basic3.sim -m ./test.sh -f tsim/stable/vnode3.sim -m ./test.sh -f tsim/qnode/basic1.sim -m ./test.sh -f tsim/mnode/basic1.sim -m