summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b35d69)
raw | patch | inline | side by side (parent: 0b35d69)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Nov 2008 13:28:42 +0000 (13:28 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 12 Nov 2008 13:28:42 +0000 (13:28 +0000) |
* ticket #1587
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13008 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13008 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history | |
gosa-si/gosa-si-server | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index 83ff2b2b43a067077b07e0621ccbbbea8849ef67..3504850f27e37fe99f7683d052be9ebfa1d9ec16 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
if( $msg_header ) { $msg_header = "'$msg_header'-"; }
else { $msg_header = ""; }
+ # Memorize own source address
+ $msg =~ /<source>(\S+)<\/source>/;
+ my $own_source_address = $1;
+
# encrypt xml msg
my $crypted_msg = &encrypt_msg($msg, $encrypt_key);
# send xml msg
if( $error == 0 ) {
- print $socket $crypted_msg."\n";
+ print $socket $crypted_msg.";$own_source_address\n";
daemon_log("INFO: send ".$msg_header."msg to $address", 5);
daemon_log("DEBUG: message:\n$msg", 9);
}
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index fcb6da378d1d7de4cbc597759d36981e80351376..cfb2542eec01c7bee4e90dab8de517a23166d700 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
"SET status='error', result='can not deliver msg, please consult log file' ".
"WHERE id=$jobdb_id";
my $res = $job_db->update_dbentry($sql_statement);
+<<<<<<< .mine
+=======
&daemon_log("$session_id DEBUG: $sql_statement", 7);
+>>>>>>> .r13007
}
# sending msg was successful
my ($msg, $msg_hash, $module);
my $error = 0;
- # hole neue msg aus @msgs_to_decrypt
- my $next_msg = shift @msgs_to_decrypt;
+ # fetch new msg out of @msgs_to_decrypt
+ my $tmp_next_msg = shift @msgs_to_decrypt;
+ my ($next_msg, $msg_source) = split(/;/, $tmp_next_msg);
- # entschlüssle sie
-
# msg is from a new client or gosa
($msg, $msg_hash, $module) = &input_from_unknown_host($next_msg, $session_id);
# msg is from a gosa-si-server
}
# an error occurred
if(( !$msg ) || ( !$msg_hash ) || ( !$module )){
- # if an incoming msg could not be decrypted (maybe a wrong key), send client a ping. If the client
- # could not understand a msg from its server the client cause a re-registering process
- daemon_log("$session_id WARNING cannot understand incoming msg, send 'ping'-msg to all host with ip '".$heap->{remote_ip}.
- "' to cause a re-registering of the client if necessary", 3);
- my $sql_statement = "SELECT * FROM $main::known_clients_tn WHERE (hostname LIKE '".$heap->{'remote_ip'}."%')";
- my $query_res = $known_clients_db->select_dbentry( $sql_statement );
- while( my ($hit_num, $hit) = each %{ $query_res } ) {
- my $host_name = $hit->{'hostname'};
- my $host_key = $hit->{'hostkey'};
- my $ping_msg = "<xml> <header>gosa_ping</header> <source>$server_address</source> <target>$host_name</target></xml>";
- my $error = &send_msg_to_target($ping_msg, $host_name, $host_key, "gosa_ping", $session_id);
- &update_jobdb_status_for_send_msgs($session_id, $ping_msg, $error);
- }
- $error++;
+ # if an incoming msg could not be decrypted (maybe a wrong key), send client a ping. If the client
+ # could not understand a msg from its server the client cause a re-registering process
+ my $ping_msg = "<xml> <header>gosa_ping</header> <source>$server_address</source><target>$msg_source</target></xml>";
+ my ($test_error, $test_error_string) = &send_msg_to_target($ping_msg, "$msg_source", "dummy-key", "gosa_ping", $session_id);
+
+ daemon_log("$session_id WARNING cannot understand incoming msg, send 'ping'-msg to all host with ip '".$heap->{remote_ip}.
+ "' to cause a re-registering of the client if necessary", 3);
+ $error++;
}
-
my $header;
my $target;
my $source;