summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 400b65b)
raw | patch | inline | side by side (parent: 400b65b)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 20 May 2008 08:36:19 +0000 (08:36 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 20 May 2008 08:36:19 +0000 (08:36 +0000) |
* under construction
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10964 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10964 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server-nobus | patch | blob | history | |
gosa-si/server/events/server_server_com.pm | patch | blob | history |
index a9f612b320b5d71c7d376de468ab8edf3becb7e0..012794178bf1076f0294489795c1008d83c2552d 100755 (executable)
else {
$msg = $tmp_msg;
$msg_hash = $tmp_msg_hash;
- $module = "ClientPackages";
+ $module = "ServerPackages";
last;
}
}
print $socket $crypted_msg."\n";
daemon_log("$session_id INFO: send ".$header."msg to $address", 5);
- #daemon_log("DEBUG: message:\n$msg", 9);
+ daemon_log("DEBUG: message:\n$msg", 9);
}
diff --git a/gosa-si/server/events/server_server_com.pm b/gosa-si/server/events/server_server_com.pm
index 2b130d8f73569c1bd08fafd42b19a91ed15a4d0e..7618c3908f811aeeec0d29799523ff99b3d132b7 100644 (file)
@ISA = qw(Exporter);
my @events = (
'new_server',
+ 'confirm_new_server',
);
@EXPORT = @events;
# build confirm_new_server message
- my $out_msg = &build_msg('confirm_new_server', $main::server_address, $source);
- my $error = &main::send_msg_to_target($out_msg, $source, $key, 'confirm_new_server', 0);
+ 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);
+}
+
+
+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];
+
+ my $sql = "UPDATE $main::known_server_tn SET status='$header', hostkey='$key' WHERE hostname='$source'";
+ my $res = $main::known_server_db->update_dbentry($sql);
+
+
}
1;