mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 19:22:22 -05:00
LDAP: fix for iCal4 attendee completion, send localhost if current socket is local, else send fully qualified domain name
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@772 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
f5bafdbc6a
commit
baa5dcb814
@ -861,8 +861,13 @@ public class LdapConnection extends AbstractConnection {
|
||||
}
|
||||
|
||||
protected String hostName() throws UnknownHostException {
|
||||
// TODO: send multiple computer context with getHostName and getCanonicalHostName
|
||||
return InetAddress.getLocalHost().getCanonicalHostName();
|
||||
if (client.getInetAddress().isLoopbackAddress()) {
|
||||
// local address, probably using localhost in iCal URL
|
||||
return "localhost";
|
||||
} else {
|
||||
// remote address, send fully qualified domain name
|
||||
return InetAddress.getLocalHost().getCanonicalHostName();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user