From b9d3f2226bd274219d85ffea6beaa986bb9ed9b3 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Mon, 3 Nov 2008 12:46:38 +0000 Subject: [PATCH] bugfix: wrong pattern matching in looking for registered events for a client git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12871 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/modules/GosaPackages.pm | 2 +- gosa-si/tests/client.php | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gosa-si/modules/GosaPackages.pm b/gosa-si/modules/GosaPackages.pm index 4e60d116f..3e1b0745c 100644 --- a/gosa-si/modules/GosaPackages.pm +++ b/gosa-si/modules/GosaPackages.pm @@ -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 ); diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 437700e20..39b57d86f 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -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 = "
gosa_trigger_reload_syslog_config
GOSA GOSA 00:01:6c:9d:b9:fa
"; - - $data ="
gosa_get_hosts_with_module
GOSA10.3.67.137:20081opsi_com
"; + $data ="
gosa_krb5_get_policy
6charsGOSA00:01:6c:9d:aa:16
"; $sock->write($data); $answer = "nothing"; -- 2.30.2