[Pkg-owncloud-commits] [owncloud] 01/123: throw exception when LDAP Connection was lost

David Prévot taffit at moszumanska.debian.org
Tue May 19 23:55:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit b96b0063f6803a7a0b683e3430c5837248c8de89
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Wed Apr 22 15:22:11 2015 +0200

    throw exception when LDAP Connection was lost
---
 apps/user_ldap/lib/ldap.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/apps/user_ldap/lib/ldap.php b/apps/user_ldap/lib/ldap.php
index b4ca349..74df3dd 100644
--- a/apps/user_ldap/lib/ldap.php
+++ b/apps/user_ldap/lib/ldap.php
@@ -26,6 +26,8 @@
 
 namespace OCA\user_ldap\lib;
 
+use OC\ServerNotAvailableException;
+
 class LDAP implements ILDAPWrapper {
 	protected $curFunc = '';
 	protected $curArgs = array();
@@ -283,6 +285,8 @@ class LDAP implements ILDAPWrapper {
 					//for now
 				} else if ($errorCode === 10) {
 					//referrals, we switch them off, but then there is AD :)
+				} else if ($errorCode === -1) {
+					throw new ServerNotAvailableException('Lost connection to LDAP server.');
 				} else {
 					\OCP\Util::writeLog('user_ldap',
 										'LDAP error '.$errorMsg.' (' .

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list