Code

bugfix: wrong pattern matching in looking for registered events for a client
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Nov 2008 12:46:38 +0000 (12:46 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Nov 2008 12:46:38 +0000 (12:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12871 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 4e60d116fc6368f2cb4e48951edf462b0244c906..3e1b0745c840fc92d13498183e35ab8b83b51cdb 100644 (file)
@@ -185,7 +185,7 @@ sub process_gosa_msg {
             my $client_events = $res->{'1'}->{'events'};
 
             # client is registered for this event, deliver this message to client
-            if ($client_events =~ /,$header,/) {
+            if (($client_events =~ /^$header,/) || ($client_events =~ /,$header,/) || ($client_events =~ /,$header$/)) {
                 &main::daemon_log("$session_id INFO: client '$target' is registerd for event '$header', forward message to client.", 5);
                 @out_msg_l = ( $msg );
 
index 437700e2001c92db0f43fd5c09d1e41f0ed51e7e..39b57d86f08f53a849afb2be7a7beb0652916301 100755 (executable)
@@ -9,10 +9,10 @@ $zahl= 1;
 for($count = 1; $count <= $zahl; $count++)
 {
 
-  $sock = new Socket_Client("127.0.0.1","20081",TRUE,5);
-  $sock->setEncryptionKey("secret-gosa-password");
-  #$sock = new Socket_Client("10.89.1.30","20081",TRUE,5);
+  #$sock = new Socket_Client("127.0.0.1","20081",TRUE,5);
   #$sock->setEncryptionKey("secret-gosa-password");
+  $sock = new Socket_Client("10.89.1.42","20081",TRUE,5);
+  $sock->setEncryptionKey("secret-gosa-password");
 
   if($sock->connected()){
 
@@ -214,8 +214,7 @@ for($count = 1; $count <= $zahl; $count++)
     # SYSLOG reload
     #$data = "<xml> <header>gosa_trigger_reload_syslog_config</header> <source>GOSA</source> <target>GOSA</target> <macaddress>00:01:6c:9d:b9:fa</macaddress> </xml>"; 
 
-
-       $data ="<xml><header>gosa_get_hosts_with_module</header><source>GOSA</source><target>10.3.67.137:20081</target><module_name>opsi_com</module_name></xml>";
+    $data ="<xml><header>gosa_krb5_get_policy</header><policy>6chars</policy><source>GOSA</source><target>00:01:6c:9d:aa:16</   target></xml>";
 
     $sock->write($data);
     $answer = "nothing";