From 43078c5c688a0c59d38466273350b03e4debfa86 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Fri, 20 Jun 2014 10:36:26 +0200 Subject: [PATCH] Clearer semaphore error messages, removed some legacy code, fixed a compile warning or two. --- lib/mp4.cpp | 2 +- lib/shared_memory.cpp | 4 ++-- lib/stream.cpp | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/mp4.cpp b/lib/mp4.cpp index 758c7597..43eb422a 100644 --- a/lib/mp4.cpp +++ b/lib/mp4.cpp @@ -101,7 +101,7 @@ namespace MP4 { } else if (size == 0) { fseek(newData, 0, SEEK_END); } - DEBUG_MSG(DLVL_DEVEL, "skipping size 0x%0.8X", size); + DEBUG_MSG(DLVL_DEVEL, "skipping size 0x%0.8lX", size); if (fseek(newData, pos + size, SEEK_SET) == 0) { return true; } else { diff --git a/lib/shared_memory.cpp b/lib/shared_memory.cpp index 8227dad5..617db539 100644 --- a/lib/shared_memory.cpp +++ b/lib/shared_memory.cpp @@ -812,7 +812,7 @@ namespace IPC { mySemaphore.open(std::string("/" + baseName).c_str(), O_RDWR); #endif if (!mySemaphore) { - DEBUG_MSG(DLVL_FAIL, "Creating semaphore failed: %s", strerror(errno)); + DEBUG_MSG(DLVL_FAIL, "Creating copy of semaphore %s failed: %s", baseName.c_str(), strerror(errno)); return; } semGuard tmpGuard(mySemaphore); @@ -832,7 +832,7 @@ namespace IPC { mySemaphore.open(std::string("/" + baseName).c_str(), O_RDWR); #endif if (!mySemaphore) { - DEBUG_MSG(DLVL_FAIL, "Creating semaphore failed: %s", strerror(errno)); + DEBUG_MSG(DLVL_FAIL, "Creating semaphore %s failed: %s", baseName.c_str(), strerror(errno)); return; } semGuard tmpGuard(mySemaphore); diff --git a/lib/stream.cpp b/lib/stream.cpp index b000e103..d1297e3f 100644 --- a/lib/stream.cpp +++ b/lib/stream.cpp @@ -63,9 +63,7 @@ void Util::Stream::sanitizeName(std::string & streamname) { bool Util::Stream::getLive(std::string streamname) { JSON::Value ServConf = JSON::fromFile(getTmpFolder() + "streamlist"); - static unsigned long long counter = 0; std::stringstream name; - name << "MistInBuffer " << (counter++); std::string player_bin = Util::getMyPath() + "MistInBuffer"; DEBUG_MSG(DLVL_WARN, "Starting %s -p -s %s", player_bin.c_str(), streamname.c_str()); char * argv[15] = {(char *)player_bin.c_str(), (char *)"-p", (char *)"-s", (char *)streamname.c_str(), (char *)0}; @@ -89,7 +87,6 @@ bool Util::Stream::getLive(std::string streamname) { /// Starts a process for a VoD stream. bool Util::Stream::getVod(std::string filename, std::string streamname) { - static unsigned long long counter = 0; std::string player_bin = Util::getMyPath() + "MistInDTSC"; bool selected = false; if (filename.substr(filename.size() - 5) == ".dtsc") {