From 6628adac6a950ddc37a1cd8b53bdcde5b16af7e8 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Wed, 12 Mar 2008 11:07:36 +0000 Subject: [PATCH] client causes a reregistering if incoming msg from server could not be understood git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9704 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-client | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 75424cef3..55e78782b 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -961,10 +961,6 @@ sub trigger_logged_in_users_report { } } -sub trigger_reregistering_process { - $REGISTERED = 0; -} - sub generic_file_reset { my ( $heap, $wheel_id ) = @_[ HEAP, ARG0 ]; @@ -1088,14 +1084,24 @@ sub _default { sub server_input { my ($kernel, $heap, $input, $wheel) = @_[KERNEL, HEAP, ARG0, ARG1]; + my $remote_ip = $heap->{'remote_ip'}, my $error = 0; my $answer; + + daemon_log("INFO: Incoming msg from '$remote_ip'", 5); daemon_log("DEBUG: Incoming msg:\n$input\n", 8); my ($msg, $msg_hash) = &check_key_and_xml_validity($input, $server_key); if( (!$msg) || (!$msg_hash) ) { daemon_log("WARNING: Deciphering of incoming msg failed", 3); + if($server_address =~ /$remote_ip/) { + # got a msg from gosa-si-server which can not be decrypted, may the secrete not up-to-date + # cause a reregistering with a new secrete handshake + daemon_log("WARNING: Message from gosa-si-server could not be understood, cause reregistering at server", 3); + $REGISTERED = 0; + $kernel->yield('register_at_gosa_si_server'); + } $error++; } -- 2.30.2