summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4a6cf35)
raw | patch | inline | side by side (parent: 4a6cf35)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Mar 2008 14:55:23 +0000 (14:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Mar 2008 14:55:23 +0000 (14:55 +0000) |
-Added FAI server/release functions.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9926 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9926 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_gosaSupportDaemon.inc | patch | blob | history |
diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc
index bbb417f7925bf49c38c36aab4d55e78a743dbe47..dcfe2dd44b55492d17da0b2b8179178e4c6caa11 100644 (file)
@param boolean Connect Directly connect to daemon socket.
@param float Timeout The timelimit for all socket actions.
*/
- public function __construct($connect=TRUE,$timeout=2)
+ public function __construct($connect=TRUE,$timeout=10)
{
#FIXME: bad idea about referencing global variables from within classes
global $config;
if(isset($entries['XML'])){
if(isset($entries['XML']['ERROR_STRING'])) {
$this->set_error($entries['XML']['ERROR_STRING']);
- new log("debug","DaemonEvent (IDS) ", "gosaSupportDaemon::update_entries()", $ids,"FAILED setting (".$attr.") error was ".$this->get_error());
+ new log("debug","GOsa-si",
+ get_class($this)."::".__FUNCTION__, array(),
+ "FAILED error was ".$this->get_error());
return($ret);
}
/* Unset header tags */
- foreach(array("HEADER","SOURCE","TARGET") as $type){
- unset($entries['XML'][$type]);
+ foreach(array("HEADER","SOURCE","TARGET","SESSION_ID") as $type){
+ if(isset($entries['XML'][$type])){
+ unset($entries['XML'][$type]);
+ }
}
$ret = $entries['XML'];
}
}
- public function FAI_get_classes($name = "")
+ public function FAI_get_classes($name)
{
$this->reset_error();
-
- $xml_msg = "<xml><header>gosa_query_fai_release</header><target>GOSA</target><where><clause><RELEASE>siga</RELEASE></clause></where><source>GOSA</source></xml>";
- $xml_msg = "<xml><header>gosa_query_fai_release</header><target>GOSA</target><source>GOSA</source><where><clause><RELEASE>siga</RELEASE></clause></where></xml>";
- $xml_msg = "<xml><header>gosa_query_fai_release</header><target>GOSA</target><source>GOSA</source></xml>";
+ $xml_msg = "<xml><header>gosa_query_fai_release</header><target>GOSA</target><source>GOSA</source><where><release>".$name."</release></where></xml>";;
$ret = array();
if($this->connect()){
$this->o_sock->write($xml_msg);
$str = trim($this->o_sock->read());
$entries = $this->xml_to_array($str);
- print_a($entries);
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","DaemonEvent (IDS) ", "gosaSupportDaemon::update_entries()", $ids,"FAILED setting (".$attr.") error was ".$this->get_error());
+ new log("debug","GOsa-si",
+ get_class($this)."::".__FUNCTION__, array($name),
+ "FAILED error was ".$this->get_error());
return($ret);
}
/* Unset header tags */
- foreach(array("HEADER","SOURCE","TARGET") as $type){
- unset($entries['XML'][$type]);
+ foreach(array("HEADER","SOURCE","TARGET","SESSION_ID") as $type){
+ if(isset($entries['XML'][$type])){
+ unset($entries['XML'][$type]);
+ }
}
$ret = $entries['XML'];
}