diff --git a/gosa-si/gosa-si-bus b/gosa-si/gosa-si-bus
index 09581e67795d309aea6568ddeebcfb56f6fdc12a..90de439b50d246c3803699098d2af58fbf346489 100755 (executable)
--- a/gosa-si/gosa-si-bus
+++ b/gosa-si/gosa-si-bus
$crypted_msg = $1;
my $host = sprintf("%s.%s.%s.%s", $2, $3, $4, $5);
$crypted_msg = $1;
my $host = sprintf("%s.%s.%s.%s", $2, $3, $4, $5);
- daemon_log("msg from host:\n\t$host", 1);
- daemon_log("crypted_msg:\n\t$crypted_msg", 7);
+ daemon_log("msg from host: $host", 1);
+ daemon_log("crypted_msg: $crypted_msg", 7);
my @valid_keys;
my @daemon_keys = keys %$known_daemons;
my @valid_keys;
my @daemon_keys = keys %$known_daemons;
}
my $l = @valid_keys;
}
my $l = @valid_keys;
- daemon_log("number of valid daemons: $l\n", 7);
+ daemon_log("number of valid daemons: $l", 7);
my ($msg, $msg_hash);
my $msg_flag = 0;
my ($msg, $msg_hash);
my $msg_flag = 0;
# collect addresses from possible incoming clients
foreach my $host_key (@valid_keys) {
eval{
# collect addresses from possible incoming clients
foreach my $host_key (@valid_keys) {
eval{
- daemon_log( "daemon: $host_key\n", 7);
+ daemon_log( "daemon: $host_key", 7);
my $key_passwd = $known_daemons->{$host_key}->{passwd};
daemon_log("daemon_passwd: $key_passwd\n", 7);
my $key_cipher = &create_ciphering($key_passwd);
my $key_passwd = $known_daemons->{$host_key}->{passwd};
daemon_log("daemon_passwd: $key_passwd\n", 7);
my $key_cipher = &create_ciphering($key_passwd);
my $header = &get_content_from_xml_hash($msg_hash, "header");
my $target = &get_content_from_xml_hash($msg_hash, "target");
my $header = &get_content_from_xml_hash($msg_hash, "header");
my $target = &get_content_from_xml_hash($msg_hash, "target");
- daemon_log("header from msg:\n\t$header", 1);
- daemon_log("msg to process:\n\t$msg", 5);
- daemon_log("msg is for: \n\t$target", 7);
+ daemon_log("header from msg: $header", 1);
+ daemon_log("msg to process: $msg", 5);
+ daemon_log("msg is for: $target", 7);
if($target eq $bus_address) {
# msg is for bus
if($target eq $bus_address) {
# msg is for bus
}
}
}
}
- &print_known_daemons_hash();
+ #&print_known_daemons_hash();
return;
}
return;
}
sub create_xml_string {
my ($xml_hash) = @_ ;
my $xml_string = $xml->XMLout($xml_hash, RootName => 'xml');
sub create_xml_string {
my ($xml_hash) = @_ ;
my $xml_string = $xml->XMLout($xml_hash, RootName => 'xml');
- $xml_string =~ s/[\n]+//g;
+ #$xml_string =~ s/[\n]+//g;
return $xml_string;
}
return $xml_string;
}
# restart daemon log file
if(-e $log_file ) { unlink $log_file }
# restart daemon log file
if(-e $log_file ) { unlink $log_file }
-daemon_log("$0 started!");
+daemon_log(" ", 1);
+daemon_log("$0 started!", 1);
# Just fork, if we"re not in foreground mode
if( ! $foreground ) { $pid = fork(); }
# Just fork, if we"re not in foreground mode
if( ! $foreground ) { $pid = fork(); }
# open the bus socket
if($bus_activ eq "on") {
# open the bus socket
if($bus_activ eq "on") {
+ daemon_log(" ", 1);
$bus = IO::Socket::INET->new(LocalPort => $bus_port,
Type => SOCK_STREAM,
Reuse => 1,
$bus = IO::Socket::INET->new(LocalPort => $bus_port,
Type => SOCK_STREAM,
Reuse => 1,
) or die "kann kein TCP-Server an Port $bus_port sein: $@\n";
vec($rbits, fileno $bus, 1) = 1;
vec($wbits, fileno $bus, 1) = 1;
) or die "kann kein TCP-Server an Port $bus_port sein: $@\n";
vec($rbits, fileno $bus, 1) = 1;
vec($wbits, fileno $bus, 1) = 1;
- print "start bus at $bus_ip:$bus_port\n";
+ daemon_log ("start bus at $bus_ip:$bus_port", 1);
}
# add bus to known_daemons
}
# add bus to known_daemons