From 3319c3bd3fba98b08a76e0336d50c9b6ca62dd30 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 29 Aug 2012 09:40:18 +0000 Subject: [PATCH] Send ->HTTP/1.1 500 Internal Server Error<- to device on connection failure --- felamimail/inc/class.felamimail_activesync.inc.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/felamimail/inc/class.felamimail_activesync.inc.php b/felamimail/inc/class.felamimail_activesync.inc.php index 9235cd41fb..fa98f1707b 100644 --- a/felamimail/inc/class.felamimail_activesync.inc.php +++ b/felamimail/inc/class.felamimail_activesync.inc.php @@ -277,9 +277,10 @@ class felamimail_activesync implements activesync_plugin_write, activesync_plugi //error_log(__METHOD__.__LINE__.' create object with ProfileID:'.array2string(self::$profileID)); if (!$this->mail->openConnection(self::$profileID,false)) { - error_log(date('Y-m-d H:i:s').' '.__METHOD__.__LINE__."($account) can not open connection!".$this->mail->getErrorMessage()."\n",3,'/var/lib/egroupware/esync-imap.log'); - error_log('# Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid'].', URL='. - ($_SERVER['HTTPS']?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."\n\n",3,'/var/lib/egroupware/esync-imap.log'); + error_log(__METHOD__.__LINE__."($account) can not open connection!".$this->mail->getErrorMessage()); + //error_log(date('Y-m-d H:i:s').' '.__METHOD__.__LINE__."($account) can not open connection!".$this->mail->getErrorMessage()."\n",3,'/var/lib/egroupware/esync-imap.log'); + //error_log('# Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid'].', URL='. + // ($_SERVER['HTTPS']?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."\n\n",3,'/var/lib/egroupware/esync-imap.log'); header("HTTP/1.1 500 Internal Server Error"); //die('Mail not or mis-configured!'); throw new egw_exception_not_found(__METHOD__."($account) can not open connection!"); @@ -292,9 +293,10 @@ class felamimail_activesync implements activesync_plugin_write, activesync_plugi { if (!$this->mail->openConnection(self::$profileID,false)) { - error_log(date('Y-m-d H:i:s').' '.__METHOD__.__LINE__."($account) can not open connection!".$this->mail->getErrorMessage()."\n",3,'/var/lib/egroupware/esync-imap.log'); - error_log('# Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid'].', URL='. - ($_SERVER['HTTPS']?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."\n\n",3,'/var/lib/egroupware/esync-imap.log'); + error_log(__METHOD__.__LINE__."($account) can not open connection!".$this->mail->getErrorMessage()); + //error_log(date('Y-m-d H:i:s').' '.__METHOD__.__LINE__."($account) can not open connection!".$this->mail->getErrorMessage()."\n",3,'/var/lib/egroupware/esync-imap.log'); + //error_log('# Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid'].', URL='. + // ($_SERVER['HTTPS']?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."\n\n",3,'/var/lib/egroupware/esync-imap.log'); header("HTTP/1.1 500 Internal Server Error"); //die('Mail not or mis-configured!'); throw new egw_exception_not_found(__METHOD__."($account) can not open connection!");