Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
ec3c756b by lovetox at 2020-04-09T23:42:06+02:00
TCP: Pass Node objects instead of actual data on data-sent
- Use for logging the actual data passed to GLib
- Pass a Node object on data-sent so applications don't
have to reparse it
- - - - -
1 changed file:
- nbxmpp/tcp.py
Changes:
=====================================
nbxmpp/tcp.py
=====================================
@@ -289,14 +289,13 @@ class TCPConnection(Connection):
self._write_stanzas()
return
- for stanza in self._write_stanza_buffer:
- self._log_stanza(stanza, received=False)
- self._write_stanza_buffer = None
+ self._log_stanza(data, received=False)
- try:
- self.notify('data-sent', data)
- except Exception:
- self._log.exception('Error while executing data-sent:')
+ for stanza in self._write_stanza_buffer:
+ try:
+ self.notify('data-sent', stanza)
+ except Exception:
+ self._log.exception('Error while executing data-sent:')
if self._output_closed and not self._write_queue:
self._check_for_shutdown()
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/ec3c756b9c7657dee552ef19…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/ec3c756b9c7657dee552ef19…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
89bbf64c by lovetox at 2020-04-07T22:39:08+02:00
Dispatcher: Add logging when running timeout check
- - - - -
7ba2e6af by lovetox at 2020-04-07T22:39:39+02:00
TCP: Check write queue after sending keepalive
- - - - -
2 changed files:
- nbxmpp/dispatcher.py
- nbxmpp/tcp.py
Changes:
=====================================
nbxmpp/dispatcher.py
=====================================
@@ -468,6 +468,7 @@ class StanzaDispatcher(Observable):
self._id_callbacks[id_] = (func, timeout, user_data)
def _timeout_check(self):
+ self._log.info('Run timeout check')
timeouts = {}
for id_, data in self._id_callbacks.items():
if data[1] is not None:
=====================================
nbxmpp/tcp.py
=====================================
@@ -285,6 +285,8 @@ class TCPConnection(Connection):
data = data.decode()
if data == ' ':
# keepalive whitespace
+ if self._write_queue:
+ self._write_stanzas()
return
for stanza in self._write_stanza_buffer:
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/compare/03915f1efe9bb11623530cc…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/compare/03915f1efe9bb11623530cc…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
03915f1e by lovetox at 2020-04-06T23:04:49+02:00
SM: Correctly set delay from attribute
- - - - -
1 changed file:
- nbxmpp/smacks.py
Changes:
=====================================
nbxmpp/smacks.py
=====================================
@@ -132,7 +132,7 @@ class Smacks:
attrs = {'stamp': timestamp}
if stanza.getType() != 'groupchat':
# Dont leak our JID to Groupchats
- attrs['from'] = stanza.getAttr('from')
+ attrs['from'] = str(self._client.get_bound_jid())
stanza.addChild('delay', namespace=NS_DELAY2, attrs=attrs)
self._uqueue.append(stanza)
self._log.debug('OUT, %s', stanza.getName())
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/03915f1efe9bb11623530cc7…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/03915f1efe9bb11623530cc7…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
d6596632 by lovetox at 2020-04-06T19:13:13+02:00
Be more strict with websocket uri detection
- - - - -
2 changed files:
- gajim/common/helpers.py
- gajim/gtk/account_wizard.py
Changes:
=====================================
gajim/common/helpers.py
=====================================
@@ -1754,7 +1754,7 @@ def get_custom_host(account):
type_ = app.config.get_per('accounts', account, 'custom_type')
protocol = ConnectionProtocol.TCP
- if host.startswith('ws'):
+ if host.startswith('ws://') or host.startswith('wss://'):
protocol = ConnectionProtocol.WEBSOCKET
return ('%s:%s' % (host, port),
=====================================
gajim/gtk/account_wizard.py
=====================================
@@ -699,7 +699,7 @@ class AdvancedSettings(Page):
con_type = self._ui.con_type_combo.get_active_text()
protocol = ConnectionProtocol.TCP
- if host.startswith('ws'):
+ if host.startswith('ws://') or host.startswith('wss://'):
protocol = ConnectionProtocol.WEBSOCKET
return ('%s:%s' % (host, port),
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/d6596632557ebeffe525a64b91959d53…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/d6596632557ebeffe525a64b91959d53…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
6b44e6d6 by lovetox at 2020-04-06T06:59:56+02:00
Jingle: Fix invalid IQ error type
- - - - -
1 changed file:
- gajim/common/jingle_session.py
Changes:
=====================================
gajim/common/jingle_session.py
=====================================
@@ -588,7 +588,7 @@ class JingleSession:
creator = content['creator']
if (creator, name) not in self.contents:
text = 'Content %s (created by %s) does not exist' % (name, creator)
- self.__send_error(stanza, 'bad-request', text=text, type_='_modify')
+ self.__send_error(stanza, 'bad-request', text=text, type_='modify')
raise nbxmpp.NodeProcessed
cn = self.contents[(creator, name)]
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/6b44e6d6c833c810fbe1aca084b4888a…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/6b44e6d6c833c810fbe1aca084b4888a…
You're receiving this email because of your account on dev.gajim.org.