Fixed long forgotten merges.

This commit is contained in:
Thulinma 2014-06-18 11:52:12 +02:00
parent 8c01ec8897
commit e090a9368d
4 changed files with 6 additions and 13 deletions

View file

@ -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;

View file

@ -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);

View file

@ -427,7 +427,6 @@ bool Socket::Connection::spool() {
}
}
///
bool Socket::Connection::peek() {
/// clear buffer
downbuffer.clear();

View file

@ -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};