From 879842169b40803c6d74281e9cd60f6e59d49d78 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 19 Nov 2009 09:25:09 +0000 Subject: Write livesessions warning to log file. --- server/src/server.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/src') diff --git a/server/src/server.cc b/server/src/server.cc index 1b2a05c..b9b3743 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -60,6 +60,7 @@ #include "templatelist.h" #include "versionstr.h" #include "mutex.h" +#include "log.h" typedef long long unsigned int sessionid_t; @@ -496,8 +497,11 @@ void server() while(pracro_is_running) sleep(1); if(!forceshutdown && conn.sessions.size() != 0) { - PRACRO_ERR_LOG(server, "There are %d live sesions." - " Kill again to force shutdown.\n", conn.sessions.size()); + char errbuf[128]; + snprintf(errbuf, sizeof(errbuf), "There are %d live sessions." + " Kill again to force shutdown.\n", conn.sessions.size()); + PRACRO_ERR_LOG(server, errbuf); + log(errbuf); pracro_is_running = true; forceshutdown = true; goto again; -- cgit v1.2.3