summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager
diff options
context:
space:
mode:
authorbju <bju@maxi.fritz.box>2011-09-25 22:40:06 +0200
committerbju <bju@maxi.fritz.box>2011-09-25 22:40:06 +0200
commit5bbc68c66ef3ed02b3b1f9f98d0fc61448a79b43 (patch)
tree1a313a70b94a8a5d031ba8661d72f173419ac0ed /vdr-vdrmanager
parent58517677285feb87c6eb78ae608c3361d4acf28e (diff)
downloadvdr-manager-5bbc68c66ef3ed02b3b1f9f98d0fc61448a79b43.tar.gz
vdr-manager-5bbc68c66ef3ed02b3b1f9f98d0fc61448a79b43.tar.bz2
Timer modification was not handled thread safe - specially not with changes done by vdr itself. Now it's done the way used by the SVDRP timer
commands.
Diffstat (limited to 'vdr-vdrmanager')
-rw-r--r--vdr-vdrmanager/helpers.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/vdr-vdrmanager/helpers.cpp b/vdr-vdrmanager/helpers.cpp
index 23a32eb..96ad230 100644
--- a/vdr-vdrmanager/helpers.cpp
+++ b/vdr-vdrmanager/helpers.cpp
@@ -175,6 +175,7 @@ string cHelpers::SetTimerIntern(string args) {
return "!ERROR\r\n";
}
+ Timers.IncBeingEdited();
if (!number) {
// new timer
Timers.Add(timer);
@@ -183,6 +184,7 @@ string cHelpers::SetTimerIntern(string args) {
delete timer;
cTimer * oldTimer = Timers.Get(number);
if (!oldTimer) {
+ Timers.DecBeingEdited();
return "!ERROR\r\n";
}
if (delTimer) {
@@ -191,7 +193,8 @@ string cHelpers::SetTimerIntern(string args) {
oldTimer->Parse(params.c_str());
}
}
- Timers.Save();
+ Timers.SetModified();
+ Timers.DecBeingEdited();
return "START\r\nEND\r\n";
}