mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32: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,9 +861,14 @@ public class LdapConnection extends AbstractConnection {
|
||||
}
|
||||
|
||||
protected String hostName() throws UnknownHostException {
|
||||
// TODO: send multiple computer context with getHostName and 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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send ComputerContext
|
||||
|
Loading…
Reference in New Issue
Block a user