summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ddc921f)
raw | patch | inline | side by side (parent: ddc921f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 25 Mar 2008 07:26:45 +0000 (07:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 25 Mar 2008 07:26:45 +0000 (07:26 +0000) |
-Added better error message, if daemon connect string (gosa_si="server:port..") is missing.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9965 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9965 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 ede15bc3671a273d7633e737902cbcfbae29ae5a..9850be249085bfbe7e6229c44f012277a0f5f442 100644 (file)
*/
public function connect()
{
- $this->o_sock = new Socket_Client($this->s_host,$this->i_port,TRUE,$this->f_timeout);
- if($this->o_sock->connected()){
- $this->o_sock->setEncryptionKey($this->s_encryption_key);
- $this->is_connected = TRUE;
+ if(!empty($this->s_host) && !empty($this->i_port)){
+ $this->o_sock = new Socket_Client($this->s_host,$this->i_port,TRUE,$this->f_timeout);
+ if($this->o_sock->connected()){
+ $this->o_sock->setEncryptionKey($this->s_encryption_key);
+ $this->is_connected = TRUE;
+ }else{
+ $this->set_error($this->o_sock->get_error());
+ $this->disconnect();
+ new log("debug","gosaSupportDaemon::connect()", "Could not connect to server.", array(),$this->get_error());
+ }
}else{
- $this->set_error($this->o_sock->get_error());
- $this->disconnect();
- new log("debug","gosaSupportDaemon::connect()", "Could not connect to server.", array(),$this->get_error());
+ $this->set_error(msgPool::cmdnotfound("GOSA_SI",_("GOsa support daemon")));
}
return($this->is_connected);
}