Code

Reactivate job with delay sometimes got a mac and sometimes a socket address.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Aug 2009 08:28:38 +0000 (08:28 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Aug 2009 08:28:38 +0000 (08:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13968 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server

index 2b4b11384d5c1dc88c58b19c268ad1d3db9c0660..4cd8903015ba81e4647ee7a9beb183a2a3cc8baa 100755 (executable)
@@ -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 ".