]> git.vomp.tv Git - vompclient-marten.git/commitdiff
stopping logging in demuxer, reorganised shutdown in main to fix a
authorChris Tallon <chris@vomp.tv>
Mon, 8 Aug 2005 18:39:01 +0000 (18:39 +0000)
committerChris Tallon <chris@vomp.tv>
Mon, 8 Aug 2005 18:39:01 +0000 (18:39 +0000)
signal shutdown bug

demuxer.cc
main.cc

index b1661738313a52e6e7fc11a6ac14dd27a1d917c2..7401482142235700e7c9f61b3c1e0724fe93081f 100644 (file)
@@ -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 7f130bf844f43afbbcf792c232607224ec9c3de7..a5c7aa020cb659292abb32dea171c8864b04c92a 100644 (file)
--- 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();