From 5422ac98bd4bde676297fd49079200ba424b11d9 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Wed, 5 Mar 2008 14:35:01 +0000 Subject: [PATCH] clean ups git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9360 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-client | 12 +++--------- gosa-si/tests/client.php | 10 +++++----- gosa-si/tests/sqlite-check-server.pl | 13 ------------- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 4e4845107..9f945819e 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -601,12 +601,8 @@ sub send_msg_to_target { my ($msg, $address, $encrypt_key, $msg_header) = @_ ; my $error = 0; - if( $msg_header ) { - $msg_header = "'$msg_header'-"; - } - else { - $msg_header = ""; - } + if( $msg_header ) { $msg_header = "'$msg_header'-"; } + else { $msg_header = ""; } # encrypt xml msg my $crypted_msg = &encrypt_msg($msg, $encrypt_key); @@ -618,13 +614,11 @@ sub send_msg_to_target { $error++; } + # send xml msg if( $error == 0 ) { - # send xml msg print $socket $crypted_msg."\n"; - daemon_log("send ".$msg_header."msg to $address", 1); daemon_log("message:\n$msg", 8); - } # close socket in any case diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 1d53e1ad6..7632f70f6 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -9,7 +9,7 @@ $zahl= 1; for($count = 1; $count <= $zahl; $count++) { -$sock = new Socket_Client("127.0.0.1","20081",TRUE,1); +$sock = new Socket_Client("127.0.0.1","20181",TRUE,1); $sock->setEncryptionKey("secret-gosa-password"); if($sock->connected()){ @@ -32,7 +32,7 @@ if($sock->connected()){ # jobdb update #$data = "
gosa_update_status_jobdb_entry
GOSA GOSA 1 19700101000000
"; -#$data = "
gosa_update_status_jobdb_entry
GOSAGOSA 00:01:6c:9d:b9:fa done update
"; +#$data = "
gosa_update_status_jobdb_entry
GOSAGOSA 00:01:6c:9d:b9:fa processing update
"; # jobdb query #$data = "
gosa_query_jobdb
GOSA GOSA". @@ -51,7 +51,7 @@ if($sock->connected()){ #$data = "
gosa_clear_jobdb
GOSA GOSA
"; # set gosa-si-client to 'activated' -#$data = "
job_set_activated_for_installation
10.89.1.31:20083 GOSA 00:01:6c:9d:b9:fa
"; +#$data = "
job_set_activated_for_installation
10.89.1.31:20083 GOSA 00:01:6c:9d:b9:fa22220101000000
"; @@ -59,7 +59,7 @@ if($sock->connected()){ #$data = "
gosa_detect_hardware
10.89.1.31:20083 10.89.1.31:20081
"; #$data = "
gosa_new_key_for_client
00:01:6c:9d:b9:fa 10.89.1.31:20081
"; #$data = "
job_trigger_action_wake
00:01:6c:9d:b9:fa GOSA 19700101000000
"; -#$data = "
gosa_trigger_action_faireboot
00:01:6c:9d:b9:fa GOSA
"; +$data = "
gosa_trigger_action_faireboot
00:01:6c:9d:b9:fa GOSA
"; #$data = "
job_trigger_action_reinstall
GOSA 00:01:6c:9d:b9:fa 00:01:6c:9d:b9:fa 20130101000000
"; #$data = "
gosa_ping
00:01:6c:9d:b9:fa GOSA
"; @@ -91,7 +91,7 @@ if($sock->connected()){ # testing #$data = "
gosa_send_user_msg
GOSA GOSA susi harald susi gosa-admins-all
"; #$data = "
gosa_send_user_msg
GOSA GOSA gosa-admins-all kaffeepause
"; -$data = "
gosa_send_user_msg
GOSA GOSA cajus.pollmeier kaffeepause
"; +#$data = "
gosa_send_user_msg
GOSA GOSA cajus.pollmeier kaffeepause
"; $sock->write($data); diff --git a/gosa-si/tests/sqlite-check-server.pl b/gosa-si/tests/sqlite-check-server.pl index 0940a30e7..d4d51a9f8 100755 --- a/gosa-si/tests/sqlite-check-server.pl +++ b/gosa-si/tests/sqlite-check-server.pl @@ -87,18 +87,5 @@ if (-e $db_name) { print $answer."\n"; } -$db_name = "/var/lib/gosa-si/fai.db"; -if (-e $db_name) { - print "\n############################################################\n"; - my $table_name = "fai_server"; - print "$db_name\n"; - print "$table_name\n"; - - my $sqlite = GOSA::DBsqlite->new($db_name); - my $col_names = $sqlite->get_table_columns($table_name); - print join(', ', @{ $col_names } )."\n" ; - my $answer = $sqlite->show_table($table_name); - print $answer."\n"; -} print "\nFINISH\n"; -- 2.30.2