diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2018-03-05 22:40:12 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2018-03-05 22:40:12 +0100 |
commit | bb4b6901ad4726217d0af4019d03078e51ec93a4 (patch) | |
tree | dd241552f4f2c32b37452ca97a4d35071fbd7e7a /thread.c | |
parent | a7fdd3c1658eea61f678cd273e48fff219d28dd3 (diff) | |
download | vdr-bb4b6901ad4726217d0af4019d03078e51ec93a4.tar.gz vdr-bb4b6901ad4726217d0af4019d03078e51ec93a4.tar.bz2 |
Fixed removing a cStateKey from a cStateLock
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: thread.c 4.13 2018/03/04 13:17:04 kls Exp $ + * $Id: thread.c 4.14 2018/03/05 22:38:10 kls Exp $ */ #include "thread.h" @@ -775,6 +775,7 @@ void cStateLock::Unlock(cStateKey &StateKey, bool IncState) state++; } StateKey.state = state; + StateKey.stateLock = NULL; if (StateKey.write) { StateKey.write = false; threadId = 0; @@ -857,10 +858,8 @@ void cStateKey::Reset(void) void cStateKey::Remove(bool IncState) { - if (stateLock) { + if (stateLock) stateLock->Unlock(*this, IncState); - stateLock = NULL; - } else { esyslog("ERROR: cStateKey::Remove() called without holding a lock (key=%p)", this); ABORT; |