From 88147f3f7ac8e320c3c34b31ef1413b040ac687d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 1 May 2021 14:49:24 -0400 Subject: [PATCH] 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. --- src/zms.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/zms.cpp b/src/zms.cpp index 9d9ab9bbf..ec998920f 100644 --- a/src/zms.cpp +++ b/src/zms.cpp @@ -87,6 +87,7 @@ int main(int argc, const char *argv[], char **envp) { zmLoadStaticConfig(); zmDbConnect(); zmLoadDBConfig(); + logInit(log_id_string); for (char **env = envp; *env != 0; env++) { char *thisEnv = *env; @@ -230,6 +231,7 @@ int main(int argc, const char *argv[], char **envp) { } // end if config.opt_use_auth HwCapsDetect(); + Image::Initialise(); zmSetDefaultTermHandler(); zmSetDefaultDieHandler(); @@ -338,6 +340,7 @@ int main(int argc, const char *argv[], char **envp) { } // end if monitor or event Debug(1, "Terminating"); + Image::Deinitialise(); logTerm(); zmDbClose();