From: rettenbe Date: Mon, 14 Jan 2008 14:46:04 +0000 (+0000) Subject: bugfix: daemon_log X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f1ca978c05058a9d3041bd8af0ad8c8ba9f4f43b;p=gosa.git bugfix: daemon_log git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8328 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index b9a1cc6d6..c923354ea 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -113,7 +113,7 @@ our $known_clients_db; "bus" => {"bus_activ" => [\$bus_activ, "on"], "bus_passwd" => [\$bus_passwd, ""], - "bus_ip" => [\$bus_ip, ""], + "bus_ip" => [\$bus_ip, "0.0.0.0"], "bus_port" => [\$bus_port, "20080"], }, "server" => @@ -129,7 +129,7 @@ our $known_clients_db; }, "gosa" => {"gosa_activ" => [\$gosa_activ, "on"], - "gosa_ip" => [\$gosa_ip, ""], + "gosa_ip" => [\$gosa_ip, "0.0.0.0"], "gosa_port" => [\$gosa_port, "20082"], "gosa_passwd" => [\$gosa_passwd, "none"], }, @@ -167,10 +167,11 @@ EOF sub read_configfile { my $cfg; if( defined( $cfg_file) && ( length($cfg_file) > 0 )) { + print STDERR ">>>>>>>>>>>>>>><$cfg_file\n"; if( -r $cfg_file ) { $cfg = Config::IniFiles->new( -file => $cfg_file ); } else { - print STDERR "Couldn't read config file!"; + print STDERR "Couldn't read config file!\n"; } } else { $cfg = Config::IniFiles->new() ; @@ -216,11 +217,10 @@ sub daemon_log { my $name = $0; $name =~ s/\.\///; - print LOG_HANDLE "$month $monthday $hours:$minutes:$seconds $name $msg\n"; - if($foreground) { print $msg."\n" } + print LOG_HANDLE "\n$month $monthday $hours:$minutes:$seconds $name $msg"; } + close( LOG_HANDLE ); } -# close( LOG_HANDLE ); #log into syslog # my ($msg, $level, $facility) = @_; # if(not defined $msg) {return} @@ -491,7 +491,8 @@ sub get_processing_child { if (defined $answer) { print $PARENT_wr $answer."\n"; - daemon_log("with answer:", 5); + my $len_answer = length $answer; + daemon_log("with answer: length of answer: $len_answer", 5); daemon_log("$answer", 5); } else { print $PARENT_wr "done"."\n"; diff --git a/gosa-si/modules/GosaPackages.pm b/gosa-si/modules/GosaPackages.pm index 18423d87b..7d1bda9dd 100644 --- a/gosa-si/modules/GosaPackages.pm +++ b/gosa-si/modules/GosaPackages.pm @@ -42,7 +42,7 @@ my %cfg_defaults = }, "gosa" => {"gosa_activ" => [\$gosa_activ, "on"], - "gosa_ip" => [\$gosa_ip, ""], + "gosa_ip" => [\$gosa_ip, "0.0.0.0"], "gosa_port" => [\$gosa_port, "20082"], "gosa_passwd" => [\$gosa_passwd, "none"], }, diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 3ccd88d5f..1d93746de 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -4,7 +4,7 @@ require_once("../../gosa-core/include/class_socketClient.inc"); error_reporting(E_ALL); -$sock = new Socket_Client("10.89.1.156","20082",TRUE,1); +$sock = new Socket_Client("127.0.0.1","20082",TRUE,1); #$sock = new Socket_Client("169.254.2.248","9999",TRUE,1); $sock->setEncryptionKey("secret-gosa-password"); @@ -15,7 +15,7 @@ if($sock->connected()){ #$data = "
gosa_ping
10.89.1.155:2008210.89.1.155:20080
"; #$data = "
job_ping
10.89.1.155:2008300:1B:77:04:8A:6C 19700101000000
"; #$data = "
job_sayHello
10.89.1.155:2008300:1B:77:04:8A:6C 20130102133900
"; - $data = "
job_ping
10.89.1.155:2008300:1B:77:04:8A:6C 20130102133900
"; + #$data = "
job_ping
10.89.1.155:2008300:1B:77:04:8A:6C 20130102133900
"; # delete #$data = "
gosa_delete_jobdb_entry
headertag sayHello
"; @@ -26,7 +26,7 @@ if($sock->connected()){ #$data = "
gosa_update_timestamp_jobdb_entry
20130123456789
"; # query - #$data = "
gosa_query_jobdb
statuswaiting
"; + $data = "
gosa_query_jobdb
statuswaiting
"; # clear #$data = "
gosa_clear_jobdb
";