From 405b4a5e5c5cb3f848d55917b93afd6f71d036f1 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Oct 2008 09:29:16 +0000 Subject: [PATCH] Bugfix, get_hosts_with_modules. Correct localhost answer. Andi git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12650 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/gosaTriggered.pm | 5 ++++- gosa-si/tests/client.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index aca15bd76..a538f366c 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -1203,7 +1203,10 @@ sub get_hosts_with_module { my ($local_ip, $local_port) = split(/:/, $target); my $network_interface= &get_interface_for_ip($local_ip); my $local_mac = &get_mac_for_interface($network_interface); - &add_content2xml_hash($out_hash, "answer0", $local_mac); + $out_msg =~ s/<\/xml>/host0<\/result> <\/xml>/; + my $host_infos = "$local_ip"; + $host_infos .= " $local_mac"; + $out_msg =~ s/<\/xml>/\n $host_infos <\/answer0> \n <\/xml>/; } diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index fd1d52dbb..437700e20 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -9,7 +9,7 @@ $zahl= 1; for($count = 1; $count <= $zahl; $count++) { - $sock = new Socket_Client("127.0.0.1","20082",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.30","20081",TRUE,5); #$sock->setEncryptionKey("secret-gosa-password"); @@ -214,6 +214,9 @@ 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
"; + $sock->write($data); $answer = "nothing"; $answer = $sock->read(); -- 2.30.2