From: janw Date: Tue, 4 Aug 2009 08:28:38 +0000 (+0000) Subject: Reactivate job with delay sometimes got a mac and sometimes a socket address. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=37a374e64167321807c7df7ec5af54ef7f34b8a8;p=gosa.git 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 --- 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 ".