summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-08-06 09:41:57 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-08-06 09:41:57 +0200
commitfdd82cd972db1303c96ba6b88174c6fc69447247 (patch)
treead0e16206edf3f6a8c585af9ec446aa0bf009c21
parent4278458e69cbc785975bcd5f27c4ce98ac1381b8 (diff)
downloadvdr-fdd82cd972db1303c96ba6b88174c6fc69447247.tar.gz
vdr-fdd82cd972db1303c96ba6b88174c6fc69447247.tar.bz2
cSkins::Message() now blocks calls from background threads
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY4
-rw-r--r--skins.c6
3 files changed, 11 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 7e3aeb2d..13e402ac 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2731,3 +2731,6 @@ Dave Pickles <dave@pickles.me.uk>
Holger Dengler <holger.dengler@gmx.de>
for making the isnumber() function check the given pointer for NULL
+
+Michael Eiler <eiler.mike@gmail.com>
+ - reporting a crash in case cSkins::Message() is called from a background thread
diff --git a/HISTORY b/HISTORY
index 1c9c0240..6af67527 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6650,10 +6650,12 @@ Video Disk Recorder Revision History
- Added support for "content identifier descriptor" and "default authority descriptor"
to 'libsi' (thanks to Dave Pickles).
-2011-07-31: Version 1.7.20
+2011-08-06: Version 1.7.20
- Added some missing 'const' to tChannelID (reported by Sundararaj Reel).
- The isnumber() function now checks the given pointer for NULL (thanks to Holger
Dengler).
- Now checking Setup.InitialChannel for NULL before using it (reported by
Christoph Haubrich).
+- cSkins::Message() now blocks calls from background threads (thanks to Michael
+ Eiler for reporting a crash in such a scenario).
diff --git a/skins.c b/skins.c
index a0815e26..83428730 100644
--- a/skins.c
+++ b/skins.c
@@ -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;