get port number from ahenk.conf for xmpp connect

This commit is contained in:
Tuncay ÇOLAK 2020-10-08 11:53:20 +03:00
parent f9aedcc807
commit d7c59b10e6
2 changed files with 3 additions and 3 deletions

View file

@ -46,6 +46,7 @@ class Messenger(ClientXMPP):
if self.receiver_resource: if self.receiver_resource:
self.receiver += '/' + self.receiver_resource self.receiver += '/' + self.receiver_resource
self.port = self.configuration_manager.get('CONNECTION', 'port')
self.logger.debug('XMPP Messager parameters were set') self.logger.debug('XMPP Messager parameters were set')
self.register_extensions() self.register_extensions()
@ -73,8 +74,7 @@ class Messenger(ClientXMPP):
def connect_to_server(self): # Connect to the XMPP server and start processing XMPP stanzas. def connect_to_server(self): # Connect to the XMPP server and start processing XMPP stanzas.
try: try:
self['feature_mechanisms'].unencrypted_plain = True self['feature_mechanisms'].unencrypted_plain = True
self.connect((self.hostname, self.port), use_tls=self.use_tls)
self.connect((self.hostname, 5222), use_tls=self.use_tls)
self.process(block=False) self.process(block=False)
self.logger.debug('Connection were established successfully') self.logger.debug('Connection were established successfully')
return True return True

View file

@ -66,7 +66,7 @@ class SetupVnc(AbstractPlugin):
display_number = self.Sessions.display(user_name) display_number = self.Sessions.display(user_name)
desktop_env = self.get_desktop_env() desktop_env = self.get_desktop_env()
if desktop_env == "gnome": if desktop_env == "gnome":
self.get_username_display_gnome(user_name) display_number = self.get_username_display_gnome(user_name)
self.logger.info("Get display of {0} is {1}".format(user_name, display_number)) self.logger.info("Get display of {0} is {1}".format(user_name, display_number))
homedir = self.get_homedir(user_name) homedir = self.get_homedir(user_name)
self.logger.info("Get home directory of {0} is {1}".format(user_name, homedir)) self.logger.info("Get home directory of {0} is {1}".format(user_name, homedir))