From: cajus Date: Tue, 19 Feb 2008 15:55:02 +0000 (+0000) Subject: Updated for ping X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=327cff80ca71ec736e0c7689777ccefcf62de9b3;p=gosa.git Updated for ping git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8964 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index b712d7614..4427592eb 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -590,6 +590,19 @@ class gosaSupportDaemon } + static function ping($target) + { + 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); + } + + return (FALSE); + } + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/include/class_socketClient.inc b/gosa-core/include/class_socketClient.inc index 2812e2688..7219459bc 100644 --- a/gosa-core/include/class_socketClient.inc +++ b/gosa-core/include/class_socketClient.inc @@ -62,7 +62,7 @@ class Socket_Client private function decrypt($data) { /* decrypt data */ - if($this->b_encrypt){ + if($this->b_encrypt && strlen($data)){ $data = base64_decode($data); mcrypt_generic_init($this->td, $this->ckey, $this->iv); $data = mdecrypt_generic($this->td, $data); @@ -140,7 +140,6 @@ class Socket_Client } } if((microtime(TRUE) - $start) > $this->timeout ){ - trigger_error(sprintf("Exceeded timeout %f while reading from socket",$this->timeout)); break; } }