add another logInit so that early messages go to zms.log after loading config. Add Image::Initialise so that initialised flag will get set, and add a Deinitialise call so that ram allocated in zm_image gets freed.
This commit is contained in:
parent
59b1927ad6
commit
88147f3f7a
|
@ -87,6 +87,7 @@ int main(int argc, const char *argv[], char **envp) {
|
||||||
zmLoadStaticConfig();
|
zmLoadStaticConfig();
|
||||||
zmDbConnect();
|
zmDbConnect();
|
||||||
zmLoadDBConfig();
|
zmLoadDBConfig();
|
||||||
|
logInit(log_id_string);
|
||||||
|
|
||||||
for (char **env = envp; *env != 0; env++) {
|
for (char **env = envp; *env != 0; env++) {
|
||||||
char *thisEnv = *env;
|
char *thisEnv = *env;
|
||||||
|
@ -230,6 +231,7 @@ int main(int argc, const char *argv[], char **envp) {
|
||||||
} // end if config.opt_use_auth
|
} // end if config.opt_use_auth
|
||||||
|
|
||||||
HwCapsDetect();
|
HwCapsDetect();
|
||||||
|
Image::Initialise();
|
||||||
zmSetDefaultTermHandler();
|
zmSetDefaultTermHandler();
|
||||||
zmSetDefaultDieHandler();
|
zmSetDefaultDieHandler();
|
||||||
|
|
||||||
|
@ -338,6 +340,7 @@ int main(int argc, const char *argv[], char **envp) {
|
||||||
} // end if monitor or event
|
} // end if monitor or event
|
||||||
|
|
||||||
Debug(1, "Terminating");
|
Debug(1, "Terminating");
|
||||||
|
Image::Deinitialise();
|
||||||
logTerm();
|
logTerm();
|
||||||
zmDbClose();
|
zmDbClose();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue