2011-02-03 Ramon Novoa <rnovoa@artica.es>
* win32/installer/pandora.mpi, win32/pandora.cc, unix/pandora_agent: Free the threads semaphore when a module or plugin does not execute. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3796 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
76f68afcb9
commit
bc89d98ab2
|
@ -1,3 +1,8 @@
|
|||
2011-02-03 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* win32/installer/pandora.mpi, win32/pandora.cc, unix/pandora_agent: Free
|
||||
the threads semaphore when a module or plugin does not execute.
|
||||
|
||||
2011-02-01 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* android/AndroidManifest.xml
|
||||
|
|
|
@ -818,13 +818,22 @@ sub exec_module ($) {
|
|||
my $module = shift;
|
||||
|
||||
# Need something to execute
|
||||
return unless ($module->{'func'} != 0);
|
||||
if ($module->{'func'} == 0) {
|
||||
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||
return;
|
||||
}
|
||||
|
||||
# Check module interval
|
||||
return unless (++($module->{'counter'}) >= $module->{'interval'});
|
||||
if (++($module->{'counter'}) < $module->{'interval'}) {
|
||||
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||
return;
|
||||
}
|
||||
|
||||
# Check module cron
|
||||
return unless (check_module_cron ($module) == 1);
|
||||
if (check_module_cron ($module) != 1) {
|
||||
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||
return;
|
||||
}
|
||||
|
||||
# Reset module counter
|
||||
$module->{'counter'} = 0;
|
||||
|
@ -1273,7 +1282,10 @@ sub exec_plugin ($) {
|
|||
my $output = `$plugin 2>$DevNull`;
|
||||
|
||||
# Do not save the output if there was an error
|
||||
return unless ($? eq 0);
|
||||
if ($? != 0) {
|
||||
$ThreadSem->up () if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||
return;
|
||||
}
|
||||
|
||||
# Critical section
|
||||
$Sem->down () if (defined ($Sem));
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{101227}
|
||||
{101228}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("3.2(Build 101227)")
|
||||
#define PANDORA_VERSION ("3.2(Build 101228)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
Loading…
Reference in New Issue