From: hickert Date: Wed, 20 Feb 2008 12:24:13 +0000 (+0000) Subject: Updated GOsa daemon handler class. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=609e24f5a2073b0bb509dbf94dd6967f745ab1d6;p=gosa.git Updated GOsa daemon handler class. -Fixed error handling. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8984 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index 4427592eb..adb819bae 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -92,7 +92,8 @@ class gosaSupportDaemon $this->o_sock->setEncryptionKey($this->s_encryption_key); $this->is_connected = TRUE; }else{ - $this->error = $this->o_sock->get_error(); + $this->s_error = $this->o_sock->get_error(); + $this->b_error = TRUE; $this->disconnect(); } return($this->is_connected); @@ -139,7 +140,7 @@ class gosaSupportDaemon /*! \brief Returns an array containing all queued entries. @return Array All queued entries as an array. */ - public function get_queued_entries($from=0,$to=10,$sort="timestamp DESC") + public function get_queued_entries($from=-1,$to=-1,$sort="timestamp DESC") { $this->b_error = FALSE; $this->s_error = ""; @@ -155,11 +156,15 @@ class gosaSupportDaemon - ".$sort." + ".$sort.""; +if($from != -1 && $to != -1){ +$xml_msg.= " - ".$from." - ".$to." - + ".$from." + ".$to." + "; +} +$xml_msg.= " "; if($this->connect()){ @@ -175,7 +180,7 @@ class gosaSupportDaemon foreach(array("HEADER","SOURCE","TARGET") as $type){ unset($entries['XML'][$type]); } - $ret = $entries; + $ret = $entries['XML']; } } } @@ -595,7 +600,6 @@ class gosaSupportDaemon if (tests::is_mac($target)){ /* Get communication object */ $d= new gosaSupportDaemon(TRUE,0.5); - $answer= $d->_send("
gosa_ping
GOSA$target
", TRUE); return (count($answer) ? TRUE:FALSE); }