Code

change function get_where_statement, to handle the INTEGER column id
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Apr 2008 10:24:10 +0000 (10:24 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Apr 2008 10:24:10 +0000 (10:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10642 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/modules/GosaSupportDaemon.pm
gosa-si/tests/client.php

index 0560933c190b087e269d36bba002a161b5164c69..a14d5def0d4621b96c32d9ade846b21e067987f7 100644 (file)
@@ -264,7 +264,12 @@ sub get_where_statement {
                 my @xml_tags = keys %{$phrase};
                 my $tag = $xml_tags[0];
                 my $val = $phrase->{$tag}[0];
-                push(@phrase_l, "$tag$operator'$val'");
+                               # integer columns do not have to have single quotes besides the value
+                               if ($tag eq "id") {
+                                               push(@phrase_l, "$tag$operator$val");
+                               } else {
+                                               push(@phrase_l, "$tag$operator'$val'");
+                               }
             }
             my $clause_str .= join(" $connector ", @phrase_l);
             push(@clause_l, "($clause_str)");
index 4348bea9c60eec958454ab11ead5718f3e9bcfa9..dafcce5cd5dc35791fd23fced26a53f8abf2a1d3 100755 (executable)
@@ -10,7 +10,7 @@ for($count = 1; $count <= $zahl; $count++)
 {
 
   $sock = new Socket_Client("127.0.0.1","20081",TRUE,1);
-  $sock->setEncryptionKey("secret-gosa-password");
+  $sock->setEncryptionKey("UldOjon9gra");
 
   if($sock->connected()){
 
@@ -21,7 +21,7 @@ for($count = 1; $count <= $zahl; $count++)
     #$data = "<xml> <header>job_ping</header> <source>GOSA</source> <target>00:01:6c:9d:b9:fa</target> <macaddress>00:01:6c:9d:b9:fa</macaddress><timestamp>19700101000000</timestamp> </xml>";
 
     # jobdb delete
-    #$data = "<xml> <header>gosa_delete_jobdb_entry</header> <source>GOSA</source> <target>GOSA</target> <where><clause><phrase><id>1</id></phrase></clause></where></xml>";
+    $data = "<xml> <header>gosa_delete_jobdb_entry</header> <source>GOSA</source> <target>GOSA</target> <where><clause><phrase><id>3</id></phrase></clause></where></xml>";
 
     # smbhash
     #$data = "<xml> <header>gosa_gen_smb_hash</header> <source>GOSA</source><target>GOSA</target><password>tester</password></xml>";
@@ -99,7 +99,7 @@ for($count = 1; $count <= $zahl; $count++)
 
     #########
     # Kerberos test query
-    $data = "<xml> <header>gosa_krb5_list_principals</header> <target>00:01:6c:9d:b9:fa</target> <source>GOSA</source></xml>"; 
+    #$data = "<xml> <header>gosa_krb5_list_principals</header> <target>00:01:6c:9d:b9:fa</target> <source>GOSA</source></xml>"; 
 
     $sock->write($data);
     $answer = "nothing";