|
|
@@ -226,6 +226,15 @@ class KerioApiSocket implements KerioApiSocketInterface {
|
|
|
* @return boolean True on success
|
|
|
*/
|
|
|
public final function checkConnection() {
|
|
|
+
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $this->hostname,
|
|
|
+ 'Debug Kerio Api 1',
|
|
|
+ gethostbyname($this->hostname)
|
|
|
+ );
|
|
|
+
|
|
|
if ($this->checkHost()) {
|
|
|
$socket = @fsockopen($this->hostname, $this->port, $errno, $errstr, $this->timeout);
|
|
|
$this->errorCode = $errno;
|
|
|
@@ -244,15 +253,6 @@ class KerioApiSocket implements KerioApiSocketInterface {
|
|
|
* @return boolean True on success
|
|
|
*/
|
|
|
public final function checkHost() {
|
|
|
-
|
|
|
- logModuleCall(
|
|
|
- 'kerioEmail',
|
|
|
- __FUNCTION__,
|
|
|
- $this,
|
|
|
- 'Debug Kerio Api 1',
|
|
|
- gethostbyname($this->hostname)
|
|
|
- );
|
|
|
-
|
|
|
return gethostbyname($this->hostname) ? TRUE : FALSE;
|
|
|
}
|
|
|
|