diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index 5f160733477b1c4b4aae02c7ae594f82a9535981..0d86efe43e9a3160f782c166089f5fc541571281 100644 (file)
}
+ public function FAI_get_kernels($release)
+ {
+ $xml_msg = "<xml><header>gosa_get_available_kernel</header><source>GOSA</source><target>GOSA</target><release>halut</release></xml>";
+
+ if($this->connect()){
+ $this->o_sock->write($xml_msg);
+ $str = trim($this->o_sock->read());
+
+ /* Check if something went wrong while reading */
+ if($this->o_sock->is_error()){
+ $this->set_error($this->o_sock->get_error());
+ return($ret);
+ }
+
+ $entries = $this->xml_to_array($str);
+ if(isset($entries['XML']) && is_array($entries['XML'])){
+
+ /* Check if returned values represent a valid answer */
+ if(isset($entries['XML'])){
+ if(isset($entries['XML']['ERROR_STRING'])) {
+ $this->set_error($entries['XML']['ERROR_STRING']);
+ new log("debug","GOsa-si",
+ get_class($this)."::".__FUNCTION__, array(),
+ "FAILED error was ".$this->get_error());
+ return($ret);
+ }
+
+ /* Unset header tags */
+ $ret = $entries['XML'];
+ foreach($ret as $key => $entry){
+ if(!preg_match("/^answer/i",$key)){
+ unset($ret[$key]);
+ }
+ }
+ }
+ }
+ }
+ return($ret);
+ }
public function FAI_get_package_sections($release)