From 63b78c653d1fb67c1c2723ee74b8ad614d0913c4 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Mon, 10 Nov 2008 10:55:20 +0000 Subject: [PATCH] adjust gosaTriggered.pm to trunk version of gosaTriggered.pm git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12981 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/gosaTriggered.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index d84e59585..e792f3ba3 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -882,10 +882,10 @@ sub trigger_activate_new { # To prevent replication problems just re-queue the job with 10 seconds in the future my $moddn_result = $ldap_entry->update($ldap_handle); if ($moddn_result->code() != 0) { - &main::daemon_log("$session_id ERROR: Moving the system with mac address '$mac' to new base '$base' failed (code '".$moddn_result->code()."') with '".$moddn_result->{'errorMessage'}."'!", 1); - $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id"); - $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET timestamp = '".(&calc_timestamp(&get_time(), 'plus', 10))."' WHERE id = $jobdb_id"); - return undef; + my $error_string = "Moving the system with mac address '$mac' to new base '$base' failed (code '".$moddn_result->code()."') with '".$moddn_result->{'errorMessage'}."'!"; + &main::daemon_log("$session_id ERROR: $error_string", 1); + my $sql = "UPDATE $main::job_queue_tn SET status='error', result='$error_string' WHERE id=$jobdb_id"; + return undef; } else { &main::daemon_log("$session_id INFO: System with mac address '$mac' was moved to base '".$main::ldap_base."'! Re-queuing job.", 4); $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id"); -- 2.30.2