From 37a374e64167321807c7df7ec5af54ef7f34b8a8 Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 4 Aug 2009 08:28:38 +0000 Subject: [PATCH] Reactivate job with delay sometimes got a mac and sometimes a socket address. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13968 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 2b4b11384..4cd890301 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1056,8 +1056,17 @@ sub update_jobdb_status_for_send_msgs { ||($job_header eq "trigger_action_reinstall") ||($job_header eq "trigger_activate_new") ) { - &reactivate_job_with_delay($session_id, $job_target, $job_header, 30 ); - + if ($job_target =~ /^([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})$/i) { + &reactivate_job_with_delay($session_id, $job_target, $job_header, 30 ); + } else { + # If we don't have the mac adress at this time, we use the plainname + my $plainname_result = $job_db->select_dbentry("SELECT plainname from jobs where id=$jobdb_id"); + my $plainname = $job_target; + if ((keys(%$plainname_result) > 0) ) { + $plainname = $plainname_result->{1}->{$job_target}; + } + &reactivate_job_with_delay($session_id, $plainname, $job_header, 30 ); + } # For all other messages } else { my $sql_statement = "UPDATE $job_queue_tn ". -- 2.30.2