【修改】整体功能测试过程中修改部分输出及BugFIX
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -286,6 +286,7 @@ struct lua_plugin
|
||||
int ctx_new_ref;
|
||||
/* context_free函数在状态机中的引用值 */
|
||||
int ctx_free_ref;
|
||||
/* 该插件中订阅的topic */
|
||||
UT_array *sub_topic_array;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user