mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 17:16:51 +00:00
Snapshot 2010-09-15
This commit is contained in:
@@ -151,7 +151,10 @@ cTSExt::cTSExt(cRingBufferLinear *ResultBuffer, const cServerConnection *Connect
|
||||
|
||||
// look for section parameters: /path;param1=value1;param2=value2/
|
||||
std::string::size_type begin, end;
|
||||
std::string path = Connection->Headers().at("PATH_INFO");
|
||||
const static std::string PATH_INFO("PATH_INFO");
|
||||
|
||||
tStrStrMap::const_iterator it_pathinfo = Connection->Headers().find(PATH_INFO);
|
||||
const std::string& path = it_pathinfo == Connection->Headers().end() ? "/" : it_pathinfo->second;
|
||||
begin = path.find(';', 0);
|
||||
begin = path.find_first_not_of(';', begin);
|
||||
end = path.find_first_of(";/", begin);
|
||||
@@ -188,6 +191,11 @@ cTSExt::cTSExt(cRingBufferLinear *ResultBuffer, const cServerConnection *Connect
|
||||
if (setpgid(0, 0) == -1)
|
||||
esyslog("streamdev-server: externremux setpgid failed: %m");
|
||||
|
||||
if (access(opt_remux, X_OK) == -1) {
|
||||
esyslog("streamdev-server %s: %m", opt_remux);
|
||||
_exit(-1);
|
||||
}
|
||||
|
||||
if (execle("/bin/sh", "sh", "-c", opt_remux, NULL, env) == -1) {
|
||||
esyslog("streamdev-server: externremux script '%s' execution failed: %m", opt_remux);
|
||||
_exit(-1);
|
||||
|
Reference in New Issue
Block a user