From: rettenbe Date: Wed, 17 Dec 2008 09:10:28 +0000 (+0000) Subject: function 'set_activated_for_installation' is extended about sending new ldap config... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d68f3d2d1f6b356840ef63d7274b0bcdca25f12c;p=gosa.git function 'set_activated_for_installation' is extended about sending new ldap config additionally git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13298 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index 4c0f52ccc..bbb1c3314 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -486,6 +486,11 @@ sub set_activated_for_installation { my $res = $main::job_db->exec_statement($sql_statement); } + # If a client gets a 'set_activated_for_installation' msg, always deliver a fresh 'new_ldap_config' + # just for backup and robustness purposes + my $ldap_out_msg = &ClientPackages::new_ldap_config($mac, $session_id); + push(@out_msg_l, $ldap_out_msg); + # create set_activated_for_installation message for delivery my $out_hash = &create_xml_hash("set_activated_for_installation", $source, $target); if( defined $jobdb_id ) { @@ -1017,19 +1022,17 @@ sub trigger_activate_new { # Create delivery list my @out_msg_l; - # Set job to done - $main::job_db->exec_statement("UPDATE jobs SET status = 'done' WHERE id = $jobdb_id"); + # Set job to done + $main::job_db->exec_statement("UPDATE jobs SET status = 'done' WHERE id = $jobdb_id"); - # Add new_ldap_config message to delivery list - my $ldap_out_msg = &ClientPackages::new_ldap_config($mac, $session_id); - push(@out_msg_l, $ldap_out_msg); + # create set_activated_for_installation message for delivery + my $out_hash = &create_xml_hash("set_activated_for_installation", $source, $target); + my $out_msg = &create_xml_string($out_hash); + push(@out_msg_l, $out_msg); - # create set_activated_for_installation message for delivery - my $out_hash = &create_xml_hash("set_activated_for_installation", $source, $target); - my $out_msg = &create_xml_string($out_hash); - push(@out_msg_l, $out_msg); + # Return delivery list of messages + return @out_msg_l; - return @out_msg_l; } else { &main::daemon_log("$session_id WARNING: Activating system with mac address '$mac' failed! Re-queuing job.", 4); $main::job_db->exec_statement("UPDATE ".$main::job_queue_tn." SET status = 'waiting' WHERE id = $jobdb_id");