diff --git a/src/common/xmpp/auth_nb.py b/src/common/xmpp/auth_nb.py index af74299c1..c1edfd33e 100644 --- a/src/common/xmpp/auth_nb.py +++ b/src/common/xmpp/auth_nb.py @@ -158,7 +158,7 @@ class SASL(PlugIn): if 'GSSAPI' in self.mecs and have_kerberos: self.mecs.remove('GSSAPI') self.gss_vc = kerberos.authGSSClientInit('xmpp@' + \ - self._owner.socket._hostfqdn)[1] + self._owner.xmpp_hostname)[1] kerberos.authGSSClientStep(self.gss_vc, '') response = kerberos.authGSSClientResponse(self.gss_vc) node=Node('auth',attrs={'xmlns': NS_SASL, 'mechanism': 'GSSAPI'}, diff --git a/src/common/xmpp/client_nb.py b/src/common/xmpp/client_nb.py index 31ac6795b..0f84981b1 100644 --- a/src/common/xmpp/client_nb.py +++ b/src/common/xmpp/client_nb.py @@ -49,6 +49,7 @@ class NonBlockingClient: self.disconnect_handlers = [] self.Server = domain + self.xmpp_hostname = None # FQDN hostname to connect to # caller is who initiated this client, it is ineeded to register the EventDispatcher self._caller = caller @@ -154,16 +155,16 @@ class NonBlockingClient: self.proxy = proxy if hostname: - xmpp_hostname = hostname + self.xmpp_hostname = hostname else: - xmpp_hostname = self.Server + self.xmpp_hostname = self.Server estabilish_tls = self.secure == 'ssl' certs = (self.cacerts, self.mycerts) proxy_dict = {} - tcp_host=xmpp_hostname - tcp_port=self.Port + tcp_host = self.xmpp_hostname + tcp_port = self.Port if proxy: # with proxies, client connects to proxy instead of directly to @@ -182,7 +183,7 @@ class NonBlockingClient: estabilish_tls = estabilish_tls, certs = certs, proxy_creds = (proxy_user, proxy_pass), - xmpp_server = (xmpp_hostname, self.Port), + xmpp_server = (self.xmpp_hostname, self.Port), domain = self.Server, bosh_dict = proxy) self.protocol_type = 'BOSH' @@ -190,7 +191,7 @@ class NonBlockingClient: else: proxy_dict['type'] = proxy['type'] - proxy_dict['xmpp_server'] = (xmpp_hostname, self.Port) + proxy_dict['xmpp_server'] = (self.xmpp_hostname, self.Port) proxy_dict['credentials'] = (proxy_user, proxy_pass) if not proxy or proxy['type'] != 'bosh':