summaryrefslogtreecommitdiff
path: root/responsememblk.c
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-08-17 21:41:02 +0200
committerthlo <smarttv640@gmail.com>2013-08-17 21:41:02 +0200
commite9268a6bec5f26684861ab972035a2917ee59417 (patch)
treefca0e5d0eeee472d29673912c8e351f10500723a /responsememblk.c
parent9060264e02cbe93b243008454f31228651e17862 (diff)
downloadvdr-plugin-smarttvweb-e9268a6bec5f26684861ab972035a2917ee59417.tar.gz
vdr-plugin-smarttvweb-e9268a6bec5f26684861ab972035a2917ee59417.tar.bz2
Allow creation of partially overlapping timers.
Diffstat (limited to 'responsememblk.c')
-rwxr-xr-x[-rw-r--r--]responsememblk.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/responsememblk.c b/responsememblk.c
index cf35dbd..03ee6af 100644..100755
--- a/responsememblk.c
+++ b/responsememblk.c
@@ -888,9 +888,13 @@ void cResponseMemBlk::receiveAddTimerReq() {
}
}
- if (Timers.GetMatch(ev) != NULL) {
+ // eTimerMatch ma ;
+ int ma;
+ if (Timers.GetMatch(ev, &ma) != NULL) {
+ if(ma == tmFull) {
+
*(mLog->log())<< DEBUGPREFIX
- << " WARING: Timer already created guid= " << guid
+ << " WARNING: Timer already created guid= " << guid
<< " and ev_id= " << ev_id
<< endl;
@@ -899,6 +903,7 @@ void cResponseMemBlk::receiveAddTimerReq() {
mResponseMessage = NULL;
sendError(400, "Bad Request", NULL, "014 Timer already defined.");
return;
+ }
}
// now, create a new timer
@@ -1107,6 +1112,14 @@ void cResponseMemBlk::sendTimersXml() {
snprintf(f, sizeof(f), "<isrec>%s</isrec>\n", ((ti->HasFlags(tfRecording) )? "true":"false"));
*mResponseMessage += f;
+ if (ti->Event() != NULL) {
+ snprintf(f, sizeof(f), "<eventid>%u</eventid>\n", ti->Event()->EventID());
+ *mResponseMessage += f;
+ }
+ else
+ *mResponseMessage += "<eventid></eventid>\n";
+
+
*mResponseMessage += "</timer>\n";
}