summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b1c42c5)
raw | patch | inline | side by side (parent: b1c42c5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Feb 2008 12:24:13 +0000 (12:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 20 Feb 2008 12:24:13 +0000 (12:24 +0000) |
-Fixed error handling.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8984 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8984 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 4427592eb54d17e10ad246cbb6da27c54d07b7b0..adb819baec9112fee9670bc1b007050ae992095a 100644 (file)
$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);
/*! \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 = "";
</phrase>
</clause>
</where>
- <orderby>".$sort."</orderby>
+ <orderby>".$sort."</orderby>";
+if($from != -1 && $to != -1){
+$xml_msg.= "
<limit>
- <from>".$from."</from>
- <to>".$to."</to>
- </limit>
+ <from>".$from."</from>
+ <to>".$to."</to>
+ </limit>";
+}
+$xml_msg.= "
</xml>";
if($this->connect()){
foreach(array("HEADER","SOURCE","TARGET") as $type){
unset($entries['XML'][$type]);
}
- $ret = $entries;
+ $ret = $entries['XML'];
}
}
}
if (tests::is_mac($target)){
/* Get communication object */
$d= new gosaSupportDaemon(TRUE,0.5);
-
$answer= $d->_send("<xml><header>gosa_ping</header><source>GOSA</source><target>$target</target></xml>", TRUE);
return (count($answer) ? TRUE:FALSE);
}