From e090a9368d823c82f87041e13a533ab09329d5f7 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 18 Jun 2014 11:52:12 +0200 Subject: [PATCH] Fixed long forgotten merges. --- lib/procs.cpp | 5 +---- lib/procs.h | 2 -- lib/socket.cpp | 1 - lib/stream.cpp | 11 +++++------ 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/procs.cpp b/lib/procs.cpp index 209bccfd..571799bd 100644 --- a/lib/procs.cpp +++ b/lib/procs.cpp @@ -138,16 +138,13 @@ void Util::Procs::setHandler() { sigaction(SIGCHLD, &new_action, NULL); atexit(exit_handler); handler_set = true; - }// else { - // DEBUG_MSG(DLVL_DEVEL, "not setting handler"); -// } + } } /// Used internally to capture child signals and update plist. void Util::Procs::childsig_handler(int signum) { if (signum != SIGCHLD) { - DEBUG_MSG(DLVL_DEVEL, "signum != SIGCHLD"); return; } int status; diff --git a/lib/procs.h b/lib/procs.h index ab56af53..0691beab 100644 --- a/lib/procs.h +++ b/lib/procs.h @@ -28,10 +28,8 @@ namespace Util { static pid_t Start(std::string name, std::string cmd); static pid_t Start(std::string name, std::string cmd, std::string cmd2); static pid_t Start(std::string name, std::string cmd, std::string cmd2, std::string cmd3); - static pid_t StartPiped(char * const * argv, int * fdin, int * fdout, int * fderr); static pid_t StartPiped(std::string name, char * const * argv, int * fdin, int * fdout, int * fderr); - static pid_t StartPiped(std::string name, std::string cmd, int * fdin, int * fdout, int * fderr); static pid_t StartPiped2(std::string name, std::string cmd1, std::string cmd2, int * fdin, int * fdout, int * fderr1, int * fderr2); static void Stop(std::string name); diff --git a/lib/socket.cpp b/lib/socket.cpp index 27428421..5e40ffc9 100644 --- a/lib/socket.cpp +++ b/lib/socket.cpp @@ -427,7 +427,6 @@ bool Socket::Connection::spool() { } } -/// bool Socket::Connection::peek() { /// clear buffer downbuffer.clear(); diff --git a/lib/stream.cpp b/lib/stream.cpp index ef43cfd5..b000e103 100644 --- a/lib/stream.cpp +++ b/lib/stream.cpp @@ -90,16 +90,15 @@ 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::stringstream name; - name << "MistInDTSC " << (counter++); std::string player_bin = Util::getMyPath() + "MistInDTSC"; - if (filename.substr(filename.size() - 5) == ".ismv") { - name.str("MistInISMV " + filename); - player_bin = Util::getMyPath() + "MistInISMV"; + bool selected = false; + if (filename.substr(filename.size() - 5) == ".dtsc") { + player_bin = Util::getMyPath() + "MistInDTSC"; + selected = true; } if (filename.substr(filename.size() - 4) == ".flv") { - name.str("MistInFLV " + filename); player_bin = Util::getMyPath() + "MistInFLV"; + selected = true; } INFO_MSG("Starting %s -p -s %s %s", player_bin.c_str(), streamname.c_str(), filename.c_str()); char * const argv[] = {(char *)player_bin.c_str(), (char *)"-p", (char *)"-s", (char *)streamname.c_str(), (char *)filename.c_str(), (char *)0};