From: rettenbe Date: Tue, 20 May 2008 09:39:07 +0000 (+0000) Subject: * gosa-si-server-nobus X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7d7c944a129df4dbc9495cf9bc9ed09ecdc71cfd;p=gosa.git * gosa-si-server-nobus * under construction git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10966 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server-nobus b/gosa-si/gosa-si-server-nobus index 012794178..f1c762966 100755 --- a/gosa-si/gosa-si-server-nobus +++ b/gosa-si/gosa-si-server-nobus @@ -932,7 +932,7 @@ sub send_msg_to_target { $res = $known_clients_db->select_dbentry($sql_statement); if( keys(%$res) > 0) { $act_status = $res->{1}->{'status'}; - if( $act_status eq "down" ) { + if ($act_status eq "down" && $new_status eq "down") { $sql_statement = "DELETE FROM known_clients WHERE hostname='$address'"; $res = $known_clients_db->del_dbentry($sql_statement); daemon_log("$session_id WARNING: failed 2x to send msg to host '$address', delete host from known_clients", 3); @@ -948,11 +948,12 @@ sub send_msg_to_target { } # known_server - $sql_statement = "SELECT * FROM known_server WHERE hostname='$address'"; + $sql_statement = "SELECT * FROM $known_server_tn WHERE hostname='$address'"; $res = $known_server_db->select_dbentry($sql_statement); +print STDERR Dumper($res); if( keys(%$res) > 0 ) { $act_status = $res->{1}->{'status'}; - if( $act_status eq "down" ) { + if ($act_status eq "down" && $new_status eq "down") { $sql_statement = "DELETE FROM known_server WHERE hostname='$address'"; $res = $known_server_db->del_dbentry($sql_statement); daemon_log("$session_id WARNING: failed 2x to send a message to host '$address', delete host from known_server", 3); diff --git a/gosa-si/server/events/server_server_com.pm b/gosa-si/server/events/server_server_com.pm index 7618c3908..56b7f2a13 100644 --- a/gosa-si/server/events/server_server_com.pm +++ b/gosa-si/server/events/server_server_com.pm @@ -58,7 +58,7 @@ sub new_server { # build confirm_new_server message my %data = ( key=>$key ); my $out_msg = &build_msg('confirm_new_server', $main::server_address, $source, \%data); - my $error = &main::send_msg_to_target($out_msg, $source, $main::Serverpackages_key, 'confirm_new_server', $session_id); + my $error = &main::send_msg_to_target($out_msg, $source, $main::ServerPackages_key, 'confirm_new_server', $session_id); } @@ -66,9 +66,6 @@ sub new_server { sub confirm_new_server { my ($msg, $msg_hash, $session_id) = @_ ; - -print STDERR Dumper($msg_hash); - my $header = @{$msg_hash->{'header'}}[0]; my $source = @{$msg_hash->{'source'}}[0]; my $key = @{$msg_hash->{'key'}}[0];