Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
7584037f
by Philipp Hörist at 2018-07-28T11:32:37Z
6 changed files:
- gajim/common/connection.py
- gajim/common/helpers.py
- gajim/common/modules/delimiter.py
- gajim/common/modules/discovery.py
- gajim/common/modules/metacontacts.py
- gajim/common/modules/roster.py
Changes:
| ... | ... | @@ -123,8 +123,8 @@ class CommonConnection: |
| 123 | 123 |
|
| 124 | 124 |
self.awaiting_cids = {} # Used for XEP-0231
|
| 125 | 125 |
|
| 126 |
- # Tracks the calls of the connect_maschine() method
|
|
| 127 |
- self._connect_maschine_calls = 0
|
|
| 126 |
+ # Tracks the calls of the connect_machine() method
|
|
| 127 |
+ self._connect_machine_calls = 0
|
|
| 128 | 128 |
|
| 129 | 129 |
self.get_config_values_or_default()
|
| 130 | 130 |
|
| ... | ... | @@ -1453,7 +1453,7 @@ class Connection(CommonConnection, ConnectionHandlers): |
| 1453 | 1453 |
# If we are not resuming, we ask for discovery info
|
| 1454 | 1454 |
# and archiving preferences
|
| 1455 | 1455 |
if not self.sm.supports_sm or (not self.sm.resuming and self.sm.enabled):
|
| 1456 |
- # This starts the connect_maschine
|
|
| 1456 |
+ # This starts the connect_machine
|
|
| 1457 | 1457 |
self.get_module('Discovery').discover_server_info()
|
| 1458 | 1458 |
self.get_module('Discovery').discover_account_info()
|
| 1459 | 1459 |
|
| ... | ... | @@ -1470,15 +1470,15 @@ class Connection(CommonConnection, ConnectionHandlers): |
| 1470 | 1470 |
self._stun_servers = self._hosts = [i for i in result_array]
|
| 1471 | 1471 |
|
| 1472 | 1472 |
@helpers.call_counter
|
| 1473 |
- def connect_maschine(self, restart=False):
|
|
| 1474 |
- log.info('Connect maschine state: %s', self._connect_maschine_calls)
|
|
| 1475 |
- if self._connect_maschine_calls == 1:
|
|
| 1473 |
+ def connect_machine(self, restart=False):
|
|
| 1474 |
+ log.info('Connect machine state: %s', self._connect_machine_calls)
|
|
| 1475 |
+ if self._connect_machine_calls == 1:
|
|
| 1476 | 1476 |
self.get_module('MetaContacts').get_metacontacts()
|
| 1477 |
- elif self._connect_maschine_calls == 2:
|
|
| 1477 |
+ elif self._connect_machine_calls == 2:
|
|
| 1478 | 1478 |
self.get_module('Delimiter').get_roster_delimiter()
|
| 1479 |
- elif self._connect_maschine_calls == 3:
|
|
| 1479 |
+ elif self._connect_machine_calls == 3:
|
|
| 1480 | 1480 |
self.get_module('Roster').request_roster()
|
| 1481 |
- elif self._connect_maschine_calls == 4:
|
|
| 1481 |
+ elif self._connect_machine_calls == 4:
|
|
| 1482 | 1482 |
self.send_first_presence()
|
| 1483 | 1483 |
|
| 1484 | 1484 |
def send_custom_status(self, show, msg, jid):
|
| ... | ... | @@ -1512,7 +1512,7 @@ def get_emoticon_theme_path(theme): |
| 1512 | 1512 |
def call_counter(func):
|
| 1513 | 1513 |
def helper(self, restart=False):
|
| 1514 | 1514 |
if restart:
|
| 1515 |
- self._connect_maschine_calls = 0
|
|
| 1516 |
- self._connect_maschine_calls += 1
|
|
| 1515 |
+ self._connect_machine_calls = 0
|
|
| 1516 |
+ self._connect_machine_calls += 1
|
|
| 1517 | 1517 |
return func(self, restart=False)
|
| 1518 | 1518 |
return helper
|
| ... | ... | @@ -51,7 +51,7 @@ class Delimiter: |
| 51 | 51 |
else:
|
| 52 | 52 |
self.set_roster_delimiter()
|
| 53 | 53 |
|
| 54 |
- self._con.connect_maschine()
|
|
| 54 |
+ self._con.connect_machine()
|
|
| 55 | 55 |
|
| 56 | 56 |
def set_roster_delimiter(self):
|
| 57 | 57 |
log.info('Set delimiter')
|
| ... | ... | @@ -199,7 +199,7 @@ class Discovery: |
| 199 | 199 |
if nbxmpp.NS_ADDRESS in features:
|
| 200 | 200 |
self._con.addressing_supported = True
|
| 201 | 201 |
|
| 202 |
- self._con.connect_maschine()
|
|
| 202 |
+ self._con.connect_machine()
|
|
| 203 | 203 |
|
| 204 | 204 |
def _parse_transports(self, from_, identities, features, data, node):
|
| 205 | 205 |
for identity in identities:
|
| ... | ... | @@ -53,7 +53,7 @@ class MetaContacts: |
| 53 | 53 |
app.nec.push_incoming_event(NetworkEvent(
|
| 54 | 54 |
'metacontacts-received', conn=self._con, meta_list=meta_list))
|
| 55 | 55 |
|
| 56 |
- self._con.connect_maschine()
|
|
| 56 |
+ self._con.connect_machine()
|
|
| 57 | 57 |
|
| 58 | 58 |
@staticmethod
|
| 59 | 59 |
def _parse_metacontacts(stanza):
|
| ... | ... | @@ -104,7 +104,7 @@ class Roster: |
| 104 | 104 |
roster=self._data.copy(),
|
| 105 | 105 |
received_from_server=received_from_server))
|
| 106 | 106 |
|
| 107 |
- self._con.connect_maschine()
|
|
| 107 |
+ self._con.connect_machine()
|
|
| 108 | 108 |
|
| 109 | 109 |
def _roster_push_received(self, con, stanza):
|
| 110 | 110 |
log.info('Push received')
|