From 15894f560be09f5cf740cee2705e0998c9d8f812 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 8 Aug 2005 18:39:01 +0000 Subject: [PATCH] stopping logging in demuxer, reorganised shutdown in main to fix a signal shutdown bug --- demuxer.cc | 3 +-- main.cc | 28 +++++++++++++++------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/demuxer.cc b/demuxer.cc index b166173..7401482 100644 --- a/demuxer.cc +++ b/demuxer.cc @@ -162,8 +162,7 @@ int Demuxer::put(UCHAR* buf, int len) if (full) // We have to exit early. break; // out of while loop } - Log::getInstance()->log( - "Demuxer", Log::DEBUG, "Put %d; took %d", ret + len, ret); +// Log::getInstance()->log("Demuxer", Log::DEBUG, "Put %d; took %d", ret + len, ret); return ret; } diff --git a/main.cc b/main.cc index 7f130bf..a5c7aa0 100644 --- a/main.cc +++ b/main.cc @@ -209,25 +209,25 @@ int main(int argc, char** argv) shutdown(1); } - success = viewman->init(); + success = vdr->init(3024); if (success) { - logger->log("Core", Log::INFO, "ViewMan module initialised"); + logger->log("Core", Log::INFO, "VDR module initialised"); } else { - logger->log("Core", Log::EMERG, "ViewMan module failed to initialise"); + logger->log("Core", Log::EMERG, "VDR module failed to initialise"); shutdown(1); } - success = vdr->init(3024); + success = viewman->init(); if (success) { - logger->log("Core", Log::INFO, "VDR module initialised"); + logger->log("Core", Log::INFO, "ViewMan module initialised"); } else { - logger->log("Core", Log::EMERG, "VDR module failed to initialise"); + logger->log("Core", Log::EMERG, "ViewMan module failed to initialise"); shutdown(1); } @@ -268,20 +268,22 @@ void shutdown(int code) logger->log("Core", Log::NOTICE, "Command module shut down"); } - if (vdr) - { - vdr->shutdown(); - delete vdr; - logger->log("Core", Log::NOTICE, "VDR module shut down"); - } - if (viewman) { + printf("here st 3\n"); + viewman->shutdown(); delete viewman; logger->log("Core", Log::NOTICE, "ViewMan module shut down"); } + if (vdr) + { + vdr->shutdown(); + delete vdr; + logger->log("Core", Log::NOTICE, "VDR module shut down"); + } + if (osd) { osd->shutdown(); -- 2.39.2