From fc35b3607261ffd267129e72976485b4ec0316f6 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Mon, 28 Jan 2008 07:38:26 +0000 Subject: [PATCH] update git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8611 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 3 +++ gosa-si/modules/DBsqlite.pm | 3 --- gosa-si/modules/GosaPackages.pm | 3 --- gosa-si/modules/ServerPackages.pm | 2 +- gosa-si/tests/client.php | 12 +++++++++--- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 11e24b459..c5fe3a1b4 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -414,6 +414,8 @@ sub client_input { } daemon_log("processing of msg finished", 5); + sleep(10); + if (defined $answer) { $heap->{client}->put($answer); } else { @@ -579,6 +581,7 @@ POE::Component::Server::TCP->new ( Port => $server_port, ClientInput => \&client_input, + Concurrency => 10, ); daemon_log("start socket for incoming xml messages at port '$server_port' ", 1); diff --git a/gosa-si/modules/DBsqlite.pm b/gosa-si/modules/DBsqlite.pm index 65d896bb4..5f7fb0683 100644 --- a/gosa-si/modules/DBsqlite.pm +++ b/gosa-si/modules/DBsqlite.pm @@ -137,8 +137,6 @@ sub add_dbentry { my $sql_statement = "INSERT INTO $table VALUES ('".join("', '", @add_list)."')"; - print STDERR $sql_statement."\n"; - &create_lock($self,'add_dbentry'); my $db_res = $self->{dbh}->do($sql_statement); &remove_lock($self,'add_dbentry'); @@ -233,7 +231,6 @@ sub show_table { #&remove_lock($self,'show_table'); my $sql_statement= "SELECT * FROM $table_name ORDER BY timestamp"; - print STDERR $sql_statement."\n"; my $res= &exec_statement($self, $sql_statement); my @answer; diff --git a/gosa-si/modules/GosaPackages.pm b/gosa-si/modules/GosaPackages.pm index 0094ebccb..bf11e8e5a 100644 --- a/gosa-si/modules/GosaPackages.pm +++ b/gosa-si/modules/GosaPackages.pm @@ -321,7 +321,6 @@ sub process_incoming_msg { my $out_cipher = &create_ciphering($gosa_passwd); $out_msg = &encrypt_msg($out_msg, $out_cipher); - return $out_msg; } @@ -448,8 +447,6 @@ sub query_jobdb { my $orderby= &get_orderby_statement($msg, $msg_hash); my $sql_statement= "SELECT $select FROM $table $where $orderby $limit"; -print STDERR "\n\n$sql_statement\n\n"; - # execute db query my $res_hash = $main::job_db->select_dbentry($sql_statement); my $out_xml = &db_res_2_xml($res_hash); diff --git a/gosa-si/modules/ServerPackages.pm b/gosa-si/modules/ServerPackages.pm index a13b8701e..884b8f7ff 100644 --- a/gosa-si/modules/ServerPackages.pm +++ b/gosa-si/modules/ServerPackages.pm @@ -528,7 +528,7 @@ sub new_passwd { } # check known_server_db - my $sql_statement = "SELECT * FROM known_server WHERE hostname='$source_name'"; + $sql_statement = "SELECT * FROM known_server WHERE hostname='$source_name'"; $query_res = $main::known_server_db->select_dbentry( $sql_statement ); if( 1 == keys %{$query_res} ) { my $act_time = &get_time; diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index e3df70614..e5590bd47 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -4,6 +4,11 @@ require_once("../../gosa-core/include/class_socketClient.inc"); error_reporting(E_ALL); +$zahl= 1; + +for($count = 1; $count <= $zahl; $count++) +{ + $sock = new Socket_Client("127.0.0.1","20081",TRUE,1); #$sock = new Socket_Client("169.254.2.248","9999",TRUE,1); $sock->setEncryptionKey("secret-gosa-password"); @@ -25,7 +30,7 @@ if($sock->connected()){ # query #$data = "
gosa_query_jobdb
andgt0le5
"; #$data= "
gosa_query_jobdb
ping03
"; -$data= "
gosa_query_jobdb
ping09timestamp
"; +$data= "
gosa_query_jobdb
ping05timestamp
"; # count @@ -39,10 +44,11 @@ $data= "
gosa_query_jobdb
$sock->write($data); $answer = "nothing"; $answer = $sock->read(); - echo ">>>$answer<<<\n"; + + echo "$count: $answer\n"; $sock->close(); }else{ echo "... FAILED!\n"; } - +} ?> -- 2.30.2