MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / Init

Function Init

Projects/sip_server/script.cpp:229–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229void Init() {
230 m_lua.setFunc("GBK2UTF8", &luaGBK2UTF8);
231
232 ludb_use_lua((void*)&m_lua);
233
234 m_lua.run(".","livectrl.lua");
235 m_lua.getFunc("Init", &luafInit);
236 m_lua.getFunc("Cleanup", &luafCleanup);
237 m_lua.getFunc("GetDevInfo", &luafGetDevInfo);
238 m_lua.getFunc("UpdateStatus",&luafUpdateStatus);
239 m_lua.getFunc("UpdatePos", &luafUpdatePos);
240 m_lua.getFunc("InsertDev", &luafInsertDev);
241 m_lua.getFunc("DeleteDev", &luafDeleteDev);
242 m_lua.getFunc("TransDevPos", &luafTransDevPos);
243
244 // ���ýű����г�ʼ��
245 if(!luafInit()){
246 Log::error("data base init failed");
247 return;
248 }
249
250 // �ű������ݿ��ȡ�豸
251 vector<SipServer::DevInfo*> devInfo = GetDevInfo();
252 for(auto &dev:devInfo) {
253
254 }
255}
256
257void Cleanup() {
258 luafCleanup();

Callers

nothing calls this directly

Calls 6

ludb_use_luaFunction · 0.85
errorFunction · 0.85
GetDevInfoFunction · 0.85
setFuncMethod · 0.80
runMethod · 0.80
getFuncMethod · 0.80

Tested by

no test coverage detected