mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
Disable galLookup on error (not supported by Exchange 2007)
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@245 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
441955eadc
commit
738ff861ea
@ -83,6 +83,8 @@ public class ExchangeSession {
|
||||
|
||||
private final ExchangeSessionFactory.PoolKey poolKey;
|
||||
|
||||
private boolean disableGalLookup = false;
|
||||
|
||||
ExchangeSessionFactory.PoolKey getPoolKey() {
|
||||
return poolKey;
|
||||
}
|
||||
@ -1200,6 +1202,7 @@ public class ExchangeSession {
|
||||
}
|
||||
|
||||
public void galLookup(Map<String, String> person) {
|
||||
if (!disableGalLookup) {
|
||||
GetMethod getMethod = null;
|
||||
try {
|
||||
getMethod = new GetMethod(URIUtil.encodePathQuery("/public/?Cmd=gallookup&ADDR=" + person.get("EM")));
|
||||
@ -1216,13 +1219,15 @@ public class ExchangeSession {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LOGGER.warn("Unable to gallookup person: " + person);
|
||||
LOGGER.warn("Unable to gallookup person: " + person + ", disable GalLookup");
|
||||
disableGalLookup = true;
|
||||
} finally {
|
||||
if (getMethod != null) {
|
||||
getMethod.releaseConnection();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getFreebusy(Map<String, String> valueMap) throws IOException {
|
||||
String result = null;
|
||||
|
Loading…
Reference in New Issue
Block a user