diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2011-08-06 09:41:57 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2011-08-06 09:41:57 +0200 |
commit | fdd82cd972db1303c96ba6b88174c6fc69447247 (patch) | |
tree | ad0e16206edf3f6a8c585af9ec446aa0bf009c21 /skins.c | |
parent | 4278458e69cbc785975bcd5f27c4ce98ac1381b8 (diff) | |
download | vdr-fdd82cd972db1303c96ba6b88174c6fc69447247.tar.gz vdr-fdd82cd972db1303c96ba6b88174c6fc69447247.tar.bz2 |
cSkins::Message() now blocks calls from background threads
Diffstat (limited to 'skins.c')
-rw-r--r-- | skins.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skins.c 2.1 2009/06/06 15:12:31 kls Exp $ + * $Id: skins.c 2.2 2011/08/06 09:41:57 kls Exp $ */ #include "skins.h" @@ -223,6 +223,10 @@ bool cSkins::SetCurrent(const char *Name) eKeys cSkins::Message(eMessageType Type, const char *s, int Seconds) { + if (!cThread::IsMainThread()) { + dsyslog("cSkins::Message() called from background thread - ignored! (Use cSkins::QueueMessage() instead)"); + return kNone; + } switch (Type) { case mtInfo: isyslog("info: %s", s); break; case mtWarning: isyslog("warning: %s", s); break; |