From 369ac2185c947021408cbdf005969dd26337a6e8 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 9 Oct 2008 10:50:13 +0000 Subject: [PATCH] Fixed opsi host detection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12653 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_gosaSupportDaemon.inc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index 9b5a6ac83..3d42381e2 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -116,17 +116,18 @@ class gosaSupportDaemon $data = array("module_name" => $mod); $res = $this->send_data("gosa_get_hosts_with_module",$this->s_host.":".$this->i_port,$data,TRUE); $hosts = array(); - if(isset($res['XML'])){ + if(isset($res['XML'][0])){ foreach($res['XML'][0] as $name => $data){ if(preg_match("/^ANSWER[0-9]*$/",$name)){ - if(isset($data[0]['MAC'][0]['VALUE'])){ + if(isset($data[0]['MAC'][0]['VALUE']) && $data[0]['MAC'][0]['VALUE'] != ""){ $hosts[] = $data[0]['MAC'][0]['VALUE']; - }elseif(isset($data[0]['VALUE'])){ - $hosts[] = $data[0]['VALUE']; - } + } elseif(isset($data[0]['IP'][0]['VALUE']) && $data[0]['IP'][0]['VALUE'] != "") { + $hosts[] = $data[0]['IP'][0]['VALUE']; + } } } } + return($hosts); } -- 2.30.2