Code

update
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Jan 2008 07:38:26 +0000 (07:38 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Jan 2008 07:38:26 +0000 (07:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8611 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server
gosa-si/modules/DBsqlite.pm
gosa-si/modules/GosaPackages.pm
gosa-si/modules/ServerPackages.pm
gosa-si/tests/client.php

index 11e24b459e6653bf4dd06ed849a2692effe16ef6..c5fe3a1b4c8f265f876bd847963b87cbc550125b 100755 (executable)
@@ -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);
 
index 65d896bb4499872ed9ba39809a71fa423f8d8bb1..5f7fb0683bd8b61f9fefec360620a9c3784f6a0b 100644 (file)
@@ -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;
index 0094ebccb540a8fecb4261822da843df76821b8d..bf11e8e5ac4b7d7eaa7467e73fdf35ffa172ccab 100644 (file)
@@ -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);
index a13b8701e6ce3f845ecdb5d190c74d9012487224..884b8f7ffdcab166588d17d6518de15da1a054b2 100644 (file)
@@ -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;
index e3df706147606b6a36b004965d9e7767e72ee4be..e5590bd470f1b4aa9aa19d79cfefeea9147f41b7 100755 (executable)
@@ -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 = "<xml><header>gosa_query_jobdb</header><where><clause><connector>and</connector><phrase><operator>gt</operator><ROWID>0</ROWID></phrase><phrase><operator>le</operator><ROWID>5</ROWID></phrase></clause></where></xml>";
 #$data= "<xml><header>gosa_query_jobdb</header><where><clause><phrase><headertag>ping</headertag></phrase></clause></where><limit><from>0</from><to>3</to></limit></xml>";
-$data= "<xml><header>gosa_query_jobdb</header><where><clause><phrase><headertag>ping</headertag></phrase></clause></where><limit><from>0</from><to>9</to></limit><orderby>timestamp</orderby></xml>";
+$data= "<xml><header>gosa_query_jobdb</header><where><clause><phrase><headertag>ping</headertag></phrase></clause></where><limit><from>0</from><to>5</to></limit><orderby>timestamp</orderby></xml>";
 
 
 # count
@@ -39,10 +44,11 @@ $data= "<xml><header>gosa_query_jobdb</header><where><clause><phrase><headertag>
     $sock->write($data);
     $answer = "nothing";
        $answer = $sock->read();
-    echo ">>>$answer<<<\n";
+    
+    echo "$count: $answer\n";
        $sock->close(); 
 }else{
        echo "... FAILED!\n";
 }
-
+}
 ?>