【修改】整体功能测试过程中修改部分输出及BugFIX

This commit is contained in:
niubinghui
2024-08-19 14:54:43 +08:00
parent 4898a47663
commit cb4f940a35
3 changed files with 10 additions and 9 deletions

View File

@@ -529,7 +529,7 @@ int lua_mq_destory_topic(lua_State *state)
int lua_mq_subscribe_topic(lua_State *state)
{
/* 参数个数检查 */
if (lua_gettop(state) != 2)
if (lua_gettop(state) != 4)
{
lua_settop(state, 0);
return 0;
@@ -547,7 +547,7 @@ int lua_mq_subscribe_topic(lua_State *state)
int plugin_id = lua_tointeger(state, -1);
lua_pop(state, 1);
int on_message_ref = luaL_ref(state, -1);
int on_message_ref = luaL_ref(state, LUA_REGISTRYINDEX);
if (on_message_ref == LUA_REFNIL)
{
lua_settop(state, 0);

View File

@@ -383,9 +383,9 @@ struct lua_plugin_manage_schema *lua_plugin_manage_init(
}
}
}
#ifdef LUAPLUGIN_BASIC_UNITTEST
debug_lua_plugin_manage_schema(new_schema);
#endif
return new_schema;
}

View File

@@ -286,6 +286,7 @@ struct lua_plugin
int ctx_new_ref;
/* context_free函数在状态机中的引用值 */
int ctx_free_ref;
/* 该插件中订阅的topic */
UT_array *sub_topic_array;
};