From 086d7aa447b6ead55219fd7021a7a5490b490979 Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 11 Mar 2008 15:11:34 +0000 Subject: [PATCH] Fix syntax. Added result message to job db on error. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9682 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/SIPackages.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gosa-si/modules/SIPackages.pm b/gosa-si/modules/SIPackages.pm index 787baff7f..5d03cf44c 100644 --- a/gosa-si/modules/SIPackages.pm +++ b/gosa-si/modules/SIPackages.pm @@ -579,17 +579,23 @@ sub here_i_am { # give the new client his ldap config # Workaround: Send within the registration response, if the client will get an ldap config later - my $new_ldap_config_out = &new_ldap_config($source); - if( $new_ldap_config_out && (!($new_ldap_config_out =~ /error/ ))) { + my $new_ldap_config_out = &new_ldap_config($source); + if($new_ldap_config_out && (!($new_ldap_config_out =~ /error/))) { &add_content2xml_hash($out_hash, "ldap_available", "true"); - } elsif ($new_ldap_config_out && $new_ldap_config_out =~ /error/){ + } elsif($new_ldap_config_out && $new_ldap_config_out =~ /error/){ &add_content2xml_hash($out_hash, "error", $new_ldap_config_out); + + my $sql_statement = "UPDATE $main::job_queue_tn ". + "SET status='error', result='$new_ldap_config_out' ". + "WHERE status='processing' AND macaddress LIKE '$mac_address'"; + my $res = $main::job_db->update_dbentry($sql_statement); + &main::daemon_log("DEBUG: $sql_statement RESULT: $res", 7); } my $register_out = &create_xml_string($out_hash); push(@out_msg_l, $register_out); # Really send the ldap config - if( $new_ldap_config_out (!($new_ldap_config_out =~ /error/))) { + if( $new_ldap_config_out && (!($new_ldap_config_out =~ /error/))) { push(@out_msg_l, $new_ldap_config_out); } -- 2.30.2