summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97b21ad)
raw | patch | inline | side by side (parent: 97b21ad)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Sep 2008 07:47:24 +0000 (07:47 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Sep 2008 07:47:24 +0000 (07:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12413 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 1820ebd1fa5d2fdc967b9305cfca16e566b1849f..40f1f4ae422669e2082e00216e081c5677948963 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
# check if module can open msg envelope with module key
($msg, $msg_hash) = &check_key_and_xml_validity($input, $module_key, $session_id);
if( (not defined $msg) || (not defined $msg_hash) ) {
- daemon_log("$session_id ERROR: no msg returned!", 2) if (not defined $msg || "" eq $msg);
- daemon_log("$session_id ERROR: no msg_hash returned!", 2) if (not defined $msg_hash || "" eq $msg_hash);
+ daemon_log("$session_id ERROR: no msg returned!", 2) if ((not defined $msg) || "" eq $msg);
+ daemon_log("$session_id ERROR: no msg_hash returned!", 2) if ((not defined $msg_hash) || "" eq $msg_hash);
next;
} else {
$module = $mod;
# Skip new jobs for host if there is a processing job
if(defined($res) and defined @{$res}[0]) {
# Prevent race condition if there is a trigger_activate job waiting and a goto-activation job processing
- if(@{$res}[5] eq 'trigger_action_reinstall') {
+ my $row = @{$res}[0] if (ref $res eq 'ARRAY');
+ if(@{$row}[5] eq 'trigger_action_reinstall') {
my $sql_statement_2 = "SELECT * FROM $job_queue_tn WHERE macaddress LIKE '$macaddress' AND status='waiting' AND headertag = 'trigger_activate_new'";
my $res_2 = $job_db->exec_statement( $sql_statement_2 );
- if(defined($res_2) and defined @{$res}[0]) {
+ if(defined($res_2) and defined @{$res_2}[0]) {
# Set status from goto-activation to 'waiting' and update timestamp
- $job_db->exec_statement = "UPDATE $job_queue_tn SET status='waiting' WHERE macaddress LIKE '$macaddress' AND headertag = 'trigger_action_reinstall'";
- $job_db->exec_statement = "UPDATE $job_queue_tn SET timestamp='".&get_time(30)."' WHERE macaddress LIKE '$macaddress' AND headertag = 'trigger_action_reinstall'";
+ $job_db->exec_statement("UPDATE $job_queue_tn SET status='waiting' WHERE macaddress LIKE '$macaddress' AND headertag = 'trigger_action_reinstall'");
+ $job_db->exec_statement("UPDATE $job_queue_tn SET timestamp='".&get_time(30)."' WHERE macaddress LIKE '$macaddress' AND headertag = 'trigger_action_reinstall'");
}
}
next;