From 5bbc68c66ef3ed02b3b1f9f98d0fc61448a79b43 Mon Sep 17 00:00:00 2001 From: bju Date: Sun, 25 Sep 2011 22:40:06 +0200 Subject: 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. --- vdr-vdrmanager/helpers.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vdr-vdrmanager/helpers.cpp') 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"; } -- cgit v1.2.3