diff options
author | Jochen Dolze <vdr@dolze.de> | 2011-12-05 10:17:23 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2011-12-05 10:17:23 +0100 |
commit | 1911754cd2fec37592c2ce8124ddfdf18bba09e7 (patch) | |
tree | 812e8252ba093db348112bf2747c3c9810331ff2 /plugin/status.cpp | |
parent | 8b07f302214d8119426b26cfa52795d90d7a89c5 (diff) | |
download | vdr-plugin-markad-1911754cd2fec37592c2ce8124ddfdf18bba09e7.tar.gz vdr-plugin-markad-1911754cd2fec37592c2ce8124ddfdf18bba09e7.tar.bz2 |
Added more info about starting markad
Diffstat (limited to 'plugin/status.cpp')
-rw-r--r-- | plugin/status.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/plugin/status.cpp b/plugin/status.cpp index c43fbff..9b49294 100644 --- a/plugin/status.cpp +++ b/plugin/status.cpp @@ -81,9 +81,9 @@ bool cStatusMarkAd::Start(const char *FileName, const char *Name, const bool Dir setup->Log2Rec ? " -R " : "", logodir,Direct ? "-O after" : "--online=2 before", FileName); - dsyslog("markad: executing %s",*cmd); if (SystemExec(cmd)!=-1) { + dsyslog("markad: executing %s",*cmd); usleep(200000); int pos=Add(FileName,Name); if (getPid(pos) && getStatus(pos)) @@ -113,8 +113,10 @@ bool cStatusMarkAd::Start(const char *FileName, const char *Name, const bool Dir } } } - return true; + } else { + isyslog("markad: cannot find running process"); } + return true; } return false; } @@ -193,7 +195,9 @@ void cStatusMarkAd::Recording(const cDevice *UNUSED(Device), const char *Name, { if (setup->LogoOnly && !LogoExists(Name)) return; // Start markad with recording - Start(FileName,Name,false); + if (!Start(FileName,Name,false)) { + esyslog("markad: failed starting on %s",FileName); + } } else { @@ -355,6 +359,7 @@ void cStatusMarkAd::Remove(int Position, bool Kill) } recs[Position].Status=0; recs[Position].Pid=0; + recs[Position].ChangedbyUser=false; } int cStatusMarkAd::Add(const char *FileName, const char *Name) @@ -370,10 +375,11 @@ int cStatusMarkAd::Add(const char *FileName, const char *Name) } else { - Name=NULL; + recs[i].Name=NULL; } recs[i].Status=0; recs[i].Pid=0; + recs[i].ChangedbyUser=false; return i; } } |