Mercurial > libervia-backend
diff sat/core/xmpp.py @ 3162:b5c058c7692e
core (xmpp), plugin android: fixed DNS, SRV handling on Android:
Android doesn't have a "/etc/resolv.conf" that Twisted expect. As a result, SRV records
can't be checked correctly on connection.
To work around that, DNS servers used on Android are checked when necessary (on Android
plugin startup and on connectivity change), using some hacks, and Twisted is patched to
use them.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 09 Feb 2020 23:56:42 +0100 |
parents | 2c7b42f53e9a |
children | 39d7327583e1 |
line wrap: on
line diff
--- a/sat/core/xmpp.py Sun Feb 09 23:56:40 2020 +0100 +++ b/sat/core/xmpp.py Sun Feb 09 23:56:42 2020 +0100 @@ -720,11 +720,6 @@ # bridge self.identities = [disco.DiscoIdentity("client", "pc", C.APP_NAME)] if sys.platform == "android": - # FIXME: temporary hack as SRV is not working on android - # TODO: remove this hack and fix SRV - log.info("FIXME: Android hack, ignoring SRV") - if host is None: - host = user_jid.host # for now we consider Android devices to be always phones self.identities = [disco.DiscoIdentity("client", "phone", C.APP_NAME)]