From 70d8748dd5ae881df86fcae0fa922452f43dd8f2 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Wed, 21 May 2008 09:55:50 +0000 Subject: [PATCH] * gosa-si-server-nobus * under construction git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10981 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/ClientPackages.pm | 10 ---------- gosa-si/server/events/server_server_com.pm | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/gosa-si/modules/ClientPackages.pm b/gosa-si/modules/ClientPackages.pm index b25c44d95..41cecf8c4 100644 --- a/gosa-si/modules/ClientPackages.pm +++ b/gosa-si/modules/ClientPackages.pm @@ -172,16 +172,6 @@ if($bus_activ eq "on") { ®ister_at_bus(); } -# add myself to known_server_db -my $res = $main::known_server_db->add_dbentry( {table=>'known_server', - primkey=>['hostname'], - hostname=>$server_address, - status=>'myself', - hostkey=>$ClientPackages_key, - timestamp=>&get_time, - } ); - - ### functions ################################################################# diff --git a/gosa-si/server/events/server_server_com.pm b/gosa-si/server/events/server_server_com.pm index bc1027c8b..760928ef2 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 { my @client_details = split(/,/, $client); # workaround to avoid double entries in foreign_clients_db - my $del_sql = "DELTE FROM $main::foreign_clients_tn WHERE hostname='".$client_details[0]."'"; + my $del_sql = "DELETE FROM $main::foreign_clients_tn WHERE hostname='".$client_details[0]."'"; push(@sql_list, $del_sql); my $sql = "INSERT INTO $main::foreign_clients_tn VALUES (" @@ -69,7 +69,9 @@ sub new_server { push(@sql_list, $sql); } if (@sql_list) { - &main::daemon_log("$session_id DEBUG: Inserting ".scalar @sql_list." entries to foreign_clients_db", 8); + my $len = @sql_list; + $len /= 2; + &main::daemon_log("$session_id DEBUG: Inserting ".$len." entries to foreign_clients_db", 8); my $res = $main::foreign_clients_db->exec_statementlist(\@sql_list); } @@ -94,4 +96,18 @@ sub confirm_new_server { } + +sub new_foreign_client { + my ($msg, $msg_hash, $session_id) = @_ ; + my $header = @{$msg_hash->{'header'}}[0]; + my $source = @{$msg_hash->{'source'}}[0]; + my $new_client = @{$msg_hash->{'client'}}[0]; + + my $func_dic = (); + + + return; +} + + 1; -- 2.30.2