summaryrefslogtreecommitdiff
path: root/source.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2012-04-28 21:00:18 +0200
committerJochen Dolze <vdr@dolze.de>2012-04-28 21:00:18 +0200
commit9706daedb3aeb2154e532d8a586f59b3166f8279 (patch)
treef8b70563d629c4b1799ec9ede8286f0ce309c71c /source.cpp
parent6eddf07612d205574b749cc2bae1c017b3e80070 (diff)
downloadvdr-plugin-xmltv2vdr-9706daedb3aeb2154e532d8a586f59b3166f8279.tar.gz
vdr-plugin-xmltv2vdr-9706daedb3aeb2154e532d8a586f59b3166f8279.tar.bz2
Moved script error output
Diffstat (limited to 'source.cpp')
-rw-r--r--source.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/source.cpp b/source.cpp
index 501e700..676e806 100644
--- a/source.cpp
+++ b/source.cpp
@@ -619,6 +619,23 @@ int cEPGSource::Execute(cEPGExecutor &myExecutor)
if (r_out) r_out[l_out]=0;
if (r_err) r_err[l_err]=0;
+ if (r_err)
+ {
+ char *saveptr;
+ char *pch=strtok_r(r_err,"\n",&saveptr);
+ char *last=(char *) "";
+ while (pch)
+ {
+ if (strcmp(last,pch))
+ {
+ esyslogs(this,"(script) %s",pch);
+ last=pch;
+ }
+ pch=strtok_r(NULL,"\n",&saveptr);
+ }
+ free(r_err);
+ }
+
if (usepipe)
{
int status;
@@ -671,23 +688,6 @@ int cEPGSource::Execute(cEPGExecutor &myExecutor)
{
lastretcode=ret;
}
-
- if (r_err)
- {
- char *saveptr;
- char *pch=strtok_r(r_err,"\n",&saveptr);
- char *last=(char *) "";
- while (pch)
- {
- if (strcmp(last,pch))
- {
- esyslogs(this,"%s",pch);
- last=pch;
- }
- pch=strtok_r(NULL,"\n",&saveptr);
- }
- free(r_err);
- }
running=false;
return ret;
}