summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44d8df5)
raw | patch | inline | side by side (parent: 44d8df5)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 27 Apr 2014 14:44:24 +0000 (16:44 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 27 Apr 2014 14:44:24 +0000 (16:44 +0200) |
Don't log success until all initialization is actually done. Also, don't
enable the connection logger until before entering the frontend main loop.
enable the connection logger until before entering the frontend main loop.
src/tools/sysdbd/main.c | patch | blob | history |
index 6d7ed7ccae70b8f06b8a9646c12318bba2b0fd88..144128ccaadea8aeabf881ae9802e90dc69ec737 100644 (file)
--- a/src/tools/sysdbd/main.c
+++ b/src/tools/sysdbd/main.c
return status;
sdb_plugin_init_all();
sdb_plugin_reconfigure_finish();
- sdb_connection_enable_logging();
return 0;
} /* do_reconfigure */
break;
/* break on error */
- if (i >= listen_addresses_num)
+ if (i >= listen_addresses_num) {
+ sdb_log(SDB_LOG_INFO, "SysDB daemon "SDB_VERSION_STRING
+ SDB_VERSION_EXTRA " (pid %i) initialized successfully",
+ (int)getpid());
+
+ sdb_connection_enable_logging();
+
sdb_fe_sock_listen_and_serve(sock, &frontend_main_loop);
+ }
sdb_log(SDB_LOG_INFO, "Waiting for backend thread to terminate");
plugin_main_loop.do_loop = 0;
if (daemonize())
exit(1);
- sdb_log(SDB_LOG_INFO, "SysDB daemon "SDB_VERSION_STRING
- SDB_VERSION_EXTRA " (pid %i) initialized successfully",
- (int)getpid());
-
sdb_plugin_init_all();
plugin_main_loop.default_interval = SECS_TO_SDB_TIME(60);
* closing the connection cleanly */
signal(SIGPIPE, SIG_IGN);
- sdb_connection_enable_logging();
status = main_loop();
sdb_log(SDB_LOG_INFO, "Shutting down SysDB daemon "SDB_VERSION_STRING