mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added a log error message to cPlugin::ConfigDirectory() in case a plugin calls it from a separate thread
This commit is contained in:
parent
1c3acf28af
commit
dc32738b27
@ -1461,6 +1461,8 @@ Udo Richter <udo_richter@gmx.de>
|
||||
for reporting that the shutdown message "Recording in ... minutes, shut down anyway?"
|
||||
may have been given with a negative number of minutes
|
||||
for fixing getting the next active timer when shutting down
|
||||
for reporting a problem with cPlugin::ConfigDirectory() in case a plugin calls it
|
||||
from a separate thread
|
||||
|
||||
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
||||
for his help in keeping 'channels.conf.terr' up to date
|
||||
|
4
HISTORY
4
HISTORY
@ -4859,7 +4859,7 @@ Video Disk Recorder Revision History
|
||||
- Fixed getting the next active timer when shutting down (thanks to Udo Richter).
|
||||
- Modified the cSVDRP::Close() function to avoid code duplication.
|
||||
|
||||
2006-08-12: Version 1.4.1-4
|
||||
2006-08-13: Version 1.4.1-4
|
||||
|
||||
- Fixed converting the port number in the "connect from..." log message of SVDRP
|
||||
(thanks to Ville Skyttä).
|
||||
@ -4872,3 +4872,5 @@ Video Disk Recorder Revision History
|
||||
in this).
|
||||
- No longer stopping removing empty directories if an error occurs (thanks to
|
||||
Oliver Endriss).
|
||||
- Added a log error message to cPlugin::ConfigDirectory() in case a plugin calls it
|
||||
from a separate thread (reported by Udo Richter).
|
||||
|
5
plugin.c
5
plugin.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: plugin.c 1.22 2006/04/17 09:20:05 kls Exp $
|
||||
* $Id: plugin.c 1.23 2006/08/13 08:51:44 kls Exp $
|
||||
*/
|
||||
|
||||
#include "plugin.h"
|
||||
@ -15,6 +15,7 @@
|
||||
#include <time.h>
|
||||
#include "config.h"
|
||||
#include "interface.h"
|
||||
#include "thread.h"
|
||||
|
||||
#define LIBVDR_PREFIX "libvdr-"
|
||||
#define SO_INDICATOR ".so."
|
||||
@ -137,6 +138,8 @@ void cPlugin::SetConfigDirectory(const char *Dir)
|
||||
const char *cPlugin::ConfigDirectory(const char *PluginName)
|
||||
{
|
||||
static char *buffer = NULL;
|
||||
if (!cThread::IsMainThread())
|
||||
esyslog("ERROR: plugin '%s' called cPlugin::ConfigDirectory(), which is not thread safe!", PluginName ? PluginName : "<no name given>");
|
||||
free(buffer);
|
||||
asprintf(&buffer, "%s/plugins%s%s", configDirectory, PluginName ? "/" : "", PluginName ? PluginName : "");
|
||||
return MakeDirs(buffer, true) ? buffer : NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user