created new instance of arch in plugin #4313

This commit is contained in:
XinyuHou 2015-02-13 12:35:12 +00:00
parent d642714fe8
commit 8e4f758cb1
7 changed files with 18 additions and 13 deletions

View file

@ -32,14 +32,15 @@ Log* g_log = NULL;
extern "C" {
void
init(void* log, void* arch)
init(void* log)
{
if (g_log == NULL) {
g_log = new Log(reinterpret_cast<Log*>(log));
}
if (g_arch == NULL) {
g_arch = new Arch(reinterpret_cast<Arch*>(arch));
g_arch = new Arch();
g_arch->init();
}
}
@ -100,6 +101,10 @@ cleanup()
if (g_secureListenSocket != NULL) {
delete g_secureListenSocket;
}
if (g_arch != NULL) {
delete g_arch;
}
}
}