Code

client causes a reregistering if incoming msg from server could not be understood
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 Mar 2008 14:24:43 +0000 (14:24 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 Mar 2008 14:24:43 +0000 (14:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9715 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-client
gosa-si/gosa-si-server

index 55e78782b4c3c5e458e7ac31e1017fca994fde7c..d56a5548d01d90199b60dffa9290e6e506053c02 100755 (executable)
@@ -691,6 +691,9 @@ sub register_at_gosa_si_server {
   my $try_to_register = 0;
 
   if( not $REGISTERED ) {
+    # clear all other triggered events and wait till registration was successful
+    $kernel->delay('trigger_new_key');
+
     # create new passwd and ciphering object for client-server communication
     $server_key = &create_passwd();
 
@@ -768,6 +771,9 @@ sub register_at_gosa_si_server {
       # clear old settings and set it again
       $kernel->delay_set('trigger_new_key', $server_key_lifetime);
     }
+
+  } else {
+    $kernel->delay('register_at_gosa_si_server');
   }
   return;
 }
@@ -930,7 +936,6 @@ sub trigger_new_key {
     &send_msg_to_target($msg, $client_address, $server_key, 'new_key');
 
     $kernel->delay_set('trigger_new_key', $server_key_lifetime);
-    $kernel->delay_set('trigger_reregistering_process', 10);
 }
 
 
@@ -1100,7 +1105,7 @@ sub server_input {
             # 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');
+            $kernel->post('client_session', 'register_at_gosa_si_server');
         }
         $error++;
     }
@@ -1114,11 +1119,6 @@ sub server_input {
 
         if( exists $event_hash->{$header} ) {
 
-            # preprocessing 
-            if($header eq "confirm_new_key") {
-                $kernel->delay_set()
-            }
-
             # a event exists with the header as name
             daemon_log("DEBUG: found event '$header' at event-module '".$event_hash->{$header}."'", 7);
             no strict 'refs';
index e0299693216f9db80a1657e67783690b72d67000..6bd1998cf08b4ce575a4f2e66ed4e19f67ed2d25 100755 (executable)
@@ -936,8 +936,8 @@ sub update_jobdb_status_for_send_msgs {
 sub _start {
     my ($kernel) = $_[KERNEL];
     &trigger_db_loop($kernel);
-       $kernel->yield('create_fai_server_db', $fai_server_tn );
-       $kernel->yield('create_fai_release_db', $fai_release_tn );
+       #$kernel->yield('create_fai_server_db', $fai_server_tn );
+       #$kernel->yield('create_fai_release_db', $fai_release_tn );
 }
 
 sub next_task {