Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2008-11-02 18:02:49 +0300
committerYann Leboulanger <asterix@lagaule.org>2008-11-02 18:02:49 +0300
commit223dc0a8f296ab95c8399a887d93eb8f1bc158a6 (patch)
treedbc04ac775e67fec529a60ad8669fd9a47648d00 /src/common/connection_handlers.py
parentf5ae955764f60a7ef00da5eafe1398197a7086c2 (diff)
don't count echo as a file transfer proxy. Fixes #4411
Diffstat (limited to 'src/common/connection_handlers.py')
-rw-r--r--src/common/connection_handlers.py44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py
index 2ef8342bf..1aa57e95d 100644
--- a/src/common/connection_handlers.py
+++ b/src/common/connection_handlers.py
@@ -758,26 +758,30 @@ class ConnectionDisco:
if self.commandInfoQuery(con, iq_obj):
raise common.xmpp.NodeProcessed
- else:
- iq = iq_obj.buildReply('result')
- q = iq.getTag('query')
- if node:
- q.setAttr('node', node)
- q.addChild('identity', attrs = gajim.gajim_identity)
- extension = None
- if node and node.find('#') != -1:
- extension = node[node.index('#') + 1:]
- client_version = 'http://gajim.org#' + gajim.caps_hash[self.name]
-
- if node in (None, client_version):
- for f in gajim.gajim_common_features:
- q.addChild('feature', attrs = {'var': f})
- for f in gajim.gajim_optional_features[self.name]:
- q.addChild('feature', attrs = {'var': f})
-
- if q.getChildren():
- self.connection.send(iq)
- raise common.xmpp.NodeProcessed
+ id = unicode(iq_obj.getAttr('id'))
+ if id[0] == 'p':
+ # We get this request from echo.server
+ raise common.xmpp.NodeProcessed
+
+ iq = iq_obj.buildReply('result')
+ q = iq.getTag('query')
+ if node:
+ q.setAttr('node', node)
+ q.addChild('identity', attrs = gajim.gajim_identity)
+ extension = None
+ if node and node.find('#') != -1:
+ extension = node[node.index('#') + 1:]
+ client_version = 'http://gajim.org#' + gajim.caps_hash[self.name]
+
+ if node in (None, client_version):
+ for f in gajim.gajim_common_features:
+ q.addChild('feature', attrs = {'var': f})
+ for f in gajim.gajim_optional_features[self.name]:
+ q.addChild('feature', attrs = {'var': f})
+
+ if q.getChildren():
+ self.connection.send(iq)
+ raise common.xmpp.NodeProcessed
def _DiscoverInfoErrorCB(self, con, iq_obj):
gajim.log.debug('DiscoverInfoErrorCB')