diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index bea358f72903078d111d8c4650f8100d645fd409..a0b121e5046eaa77a6ba6ed0a8431f24445340fa 100644 (file)
$hosts = array();
if(isset($res['XML'])){
foreach($res['XML'][0] as $name => $data){
- if(preg_match("/^HOST[0-9]*$/",$name) && $name != "HOST"){
- $hosts[] = $data[0]['MAC'][0]['VALUE'];
+ if(preg_match("/^ANSWER[0-9]*$/",$name)){
+ if(isset($data[0]['MAC'][0]['VALUE'])){
+ $hosts[] = $data[0]['MAC'][0]['VALUE'];
+ }elseif(isset($data[0]['VALUE'])){
+ $hosts[] = $data[0]['VALUE'];
+ }
}
}
}
$line = __LINE__;
$class = __CLASS__;
foreach($debug as $info){
- if(!in_array($info['function'],array("send_data","_send","set_error"))){
+ if(!in_array($info['function'],array("send_data","_send","set_error","connect"))){
$file = $info['file'];
$line = $info['line'];
$class = get_class($this);
break;
}
}
- @DEBUG(GOSA_SI, $line, "<b>".$class."::".$function."</b>" , $file, "<font color='red'><i>".htmlentities($str)."</i></font>", $info="");
+ @DEBUG(DEBUG_SI, $line, "<b>".$class."::".$function."</b>" , $file, "<font color='red'><i>".htmlentities($str)."</i></font>", $info="");
/******
Set error string.
*/
public function _send($data, $answer_expected= FALSE)
{
- $this->reset_error();
+
$ret = array();
+ if(!$this->connect()){
+ return($ret);
+ }
+
+ $this->reset_error();
/******
Debug handling
break;
}
}
- @DEBUG(GOSA_SI, $line, "<b>".$class."::".$function."</b>" , $file, "<i>".htmlentities($data)."</i>", $info="");
+ @DEBUG(DEBUG_SI, $line, "<b>".$class."::".$function."</b>" , $file, "<i>".htmlentities($data)."</i>", $info="");
/*******