Centralized 'thread active' handling
Commit Message
C.Y.M wrote:
>>Now, with the naming problem settled, are there any actual, technical
>>issues with this modification?
>>
>
>
> A quick compile test (using the patch in this thread) and all my plugins build
> except for autotimeredit-0.1.6:
>
> g++ -g -O2 -Wall -Woverloaded-virtual -c -DPLUGIN_NAME_I18N='"autotimeredit"'
> -D_GNU_SOURCE -I../../../include -I/usr/src/DVB/linux/include autotimeredit.c
> autotimeredit.c: In member function `virtual void cPluginAutoTimer::Housekeeping()':
> ../../../include/vdr/thread.h:94: error: `bool cThread::Active()' is protected
> autotimeredit.c:948: error: within this context
> make[1]: *** [autotimeredit.o] Error 1
>
The attached patch is compile tested.
Regards,
@@ -945,7 +945,7 @@
dsyslog("%s: cPluginAutoTimer::Housekeeping UpdateThread-Active=%s UpdateThread-PID=%d", plugin_name, oUpdateThread ? oUpdateThread->Active() ? "true" : "false" : "(null)", oUpdateThread ? oUpdateThread->PID() : -1);
#endif
if (oUpdateThread)
- if (oUpdateThread->Active())
+ if (oUpdateThread->Running())
{
if (time(NULL) > oUpdateThread->StartTime() + 240 )
{
@@ -417,7 +417,7 @@
dsyslog("%s: cAutoTimers::RunUpdate updatemethod=%d", plugin_name, updatemethod.u);
#endif
char * cmd = NULL;
- if (oUpdateThread && oUpdateThread->Active())
+ if (oUpdateThread && oUpdateThread->Running())
{
ERROR(tr("Error$search update is runing"));
return false;