From: hickert Date: Thu, 6 Mar 2008 15:32:18 +0000 (+0000) Subject: Updated gosaSupportDaemon X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e65b72241329a7d8a6fe248633a032a050b1280c;p=gosa.git Updated gosaSupportDaemon -Increased timeout -Added logging to clean up from mac function git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9398 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index c8a05a09f..6d6b3b4a2 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -41,7 +41,7 @@ class gosaSupportDaemon @param boolean Connect Directly connect to daemon socket. @param float Timeout The timelimit for all socket actions. */ - public function __construct($connect=TRUE,$timeout=0.2) + public function __construct($connect=TRUE,$timeout=2) { #FIXME: bad idea about referencing global variables from within classes global $config; @@ -744,7 +744,9 @@ $xml_msg.= " "; - + + new log("debug","gosaSupportDaemon::clean_queue_from_mac", "Removing all entries for mac ".$mac."", array(),"follows next."); + $data = $this->_send($xml_msg,TRUE); if(is_array($data) && isset($data['XML'])){ $already_aborted = FALSE; @@ -766,6 +768,11 @@ $xml_msg.= " $tmp->set_type(TRIGGERED_EVENT); if(!$this->append($tmp)){ msg_dialog::display(_("Error"), sprintf(_("Cannot send abort event for entry: %s"),$entry['ID']) , ERROR_DIALOG); + new log("debug","gosaSupportDaemon::clean_queue_from_mac", + "Sending 'DaemonEvent_faireboot' for ID '".$entry['ID']."' FAILED!",array(), "FAILED"); + }else{ + new log("debug","gosaSupportDaemon::clean_queue_from_mac", + "Sending 'DaemonEvent_faireboot' for ID '".$entry['ID']."' successfull",array(), "SUCCESS"); } ;break; }else{ @@ -781,6 +788,11 @@ $xml_msg.= " */ if(!$this->remove_entries(array($entry['ID']))){ msg_dialog::display(_("Error"), sprintf(_("Cannot remove entry: %s"),$entry['ID']) , ERROR_DIALOG); + new log("debug","gosaSupportDaemon::clean_queue_from_mac", + "Removing entry ID '".$entry['ID']."' FAILED!",array(), "FAILED"); + }else{ + new log("debug","gosaSupportDaemon::clean_queue_from_mac", + "Removing entry ID '".$entry['ID']."' successfull!",array(),"SUCCESS"); } ;break; }