Fix authentication failure after session expiration

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2202 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2013-12-12 21:40:37 +00:00
parent d25a2aa6cc
commit 1b22263e1e
1 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ public final class ExchangeSessionFactory {
PoolKey(String url, String userName, String password) {
this.url = url;
this.userName = userName;
this.userName = convertUserName(userName);
this.password = password;
}
@ -100,7 +100,7 @@ public final class ExchangeSessionFactory {
String result = userName;
// prepend default windows domain prefix
String defaultDomain = Settings.getProperty("davmail.defaultDomain");
if (userName.indexOf('\\') < 0 && defaultDomain != null) {
if (defaultDomain != null && userName.indexOf('\\') < 0 && userName.indexOf('@') < 0) {
result = defaultDomain + '\\' + userName;
}
return result;
@ -119,7 +119,7 @@ public final class ExchangeSessionFactory {
ExchangeSession session = null;
try {
PoolKey poolKey = new PoolKey(baseUrl, convertUserName(userName), password);
PoolKey poolKey = new PoolKey(baseUrl, userName, password);
synchronized (LOCK) {
session = POOL_MAP.get(poolKey);