Commit graph

39 commits

Author SHA1 Message Date
Brian Beggs
e835843aab fixes to digest-md5 for ejabberd 2010-07-09 15:26:26 -04:00
Tom Nichols
d6681f16d2 fixed indentation error 2010-07-07 15:19:31 -04:00
Tom Nichols
259dffeb6e send now has a priority and an 'init' parameter to denote stanzas that may be sent prior to session establishment. 2010-07-06 14:16:46 -04:00
Tom Nichols
6e93982fdf trying to get xmlstream to reconnect on stream failure 2010-07-02 16:46:34 -04:00
Brian Beggs
d62a30b0f8 digest-md5 authentication now works with unicode-literals import. Re-added the __future__ imports that were removed. 2010-07-01 09:46:12 -04:00
Brian Beggs
d763795b2c Merge remote branch 'fritzy/master'
Conflicts:
	sleekxmpp/__init__.py
	sleekxmpp/basexmpp.py
	sleekxmpp/stanza/error.py
2010-07-01 09:17:45 -04:00
Brian Beggs
fff54eaf2f temporary removed future support for sleek to support digest-md5 auth 2010-07-01 08:44:39 -04:00
Brian Beggs
488d5b29d4 fixed typo 2010-06-30 14:48:45 -04:00
Brian Beggs
9bdb297fe2 basic checking for digest-md5 to make sure the necessary components are there to complete auth. If not a failed_auth event is dispatched and the socket disconnected. 2010-06-30 14:44:57 -04:00
Brian Beggs
fa7f72d0af Fixed a defect where handlers for SASL authentication were being added multiple times. This caused issues when trying to reconnect. A handler for the auth mech would get added each reconnection attempt, causing digest-md5, success and failure to be called x times for each x number of retries.
Handlers for sasl authentication as well as success and failure are now added during the __init__ method.
2010-06-30 14:30:18 -04:00
Brian Beggs
c538ffae79 digest-md5 auth now works, had to remove from __future__ import unicode_literals to get it working correctly. Also some improvments for the prioroity message sending. 2010-06-30 13:54:53 -04:00
Brian Beggs
c0a6291fea More digest-md5 changes 2010-06-21 09:23:56 -04:00
Brian Beggs
f5d0466462 working on digest-md5 authentication 2010-06-18 09:51:29 -04:00
Thom Nichols
1f3cfb98f1 Merge branch 'master' into hacks 2010-06-02 14:18:46 -04:00
Thom Nichols
8227affd7f removed unnecessary flags and arguments from disconnect method 2010-06-02 14:17:36 -04:00
Nathan Fritz
85a2715c7d hack fix for session before bind 2010-06-03 01:30:24 +08:00
Nathan Fritz
b03e6168a8 if binding and session are advertised in the same go, do session first 2010-06-03 01:30:23 +08:00
Thom Nichols
4eb210bff5 fixed some major reconnection errors 2010-06-01 22:51:49 -04:00
Thom Nichols
1780ca900a merged a lot of fritzy's changes 2010-06-01 22:40:37 -04:00
Nathan Fritz
fa92bc866b fixed dns unicode problem 2010-05-26 11:37:01 -07:00
Tom Nichols
de4d611d30 fixed SRV query - should use dns.rdatatype.SRV 2010-05-14 11:22:17 -04:00
Tom Nichols
a92075a659 merged 2010-05-12 16:54:01 -04:00
Tom Nichols
7552efee5c some reconnetion fixes 2010-05-12 16:51:14 -04:00
Brian Beggs
e0c32b6d9b Fixes for disconnection problems detailed in http://github.com/fritzy/SleekXMPP/issues/#issue/20
Fixes to both ClientXMPP & xmlstream.  ClientXMPP was not tracking the changes to authenticated and sessionstarted after the client was disconnected.

xmlstream had some funkyness with state in the _process method that was cleaned up and hopefully made a little cleaner.

Also changed a DNS issue that was occuring that rendered me unable to disconnect.  I would recieve the following error upon reconnect.
Exception in thread process:
Exception in thread process:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/macdiesel/tmp/workspace/SleekXMPP/sleekxmpp/xmlstream/xmlstream.py", line 202, in _process
    self.reconnect()
  File "/home/macdiesel/tmp/workspace/SleekXMPP/sleekxmpp/__init__.py", line 134, in reconnect
    XMLStream.reconnect(self)
  File "/home/macdiesel/tmp/workspace/SleekXMPP/sleekxmpp/xmlstream/xmlstream.py", line 289, in reconnect
    self.connect()
  File "/home/macdiesel/tmp/workspace/SleekXMPP/sleekxmpp/__init__.py", line 99, in connect
    answers = dns.resolver.query("_xmpp-client._tcp.%s" % self.server, "SRV")
  File "/usr/local/lib/python2.6/site-packages/dns/resolver.py", line 732, in query
    return get_default_resolver().query(qname, rdtype, rdclass, tcp, source)
  File "/usr/local/lib/python2.6/site-packages/dns/resolver.py", line 617, in query
    source=source)
  File "/usr/local/lib/python2.6/site-packages/dns/query.py", line 113, in udp
    wire = q.to_wire()
  File "/usr/local/lib/python2.6/site-packages/dns/message.py", line 404, in to_wire
    r.add_question(rrset.name, rrset.rdtype, rrset.rdclass)
  File "/usr/local/lib/python2.6/site-packages/dns/renderer.py", line 152, in add_question
    self.output.write(struct.pack("!HH", rdtype, rdclass))
TypeError: unsupported operand type(s) for &: 'unicode' and 'long'

Seems I was getting this error when calling line 99 in ClientXMPP.  You can't bit-shift a 1 and a string and this is why this error is coming up. I removed the "SRV" argument and used the default of 1.  not sure exactly what this should be so it may need to be fixed back before it's merged back to trunk.

The line in question:
answers = dns.resolver.query("_xmpp-client._tcp.%s" % self.server, "SRV")
2010-05-13 04:43:25 +08:00
Nathan Fritz
ecd5a172ed replaced usage of deprecated iq result on send. Fixed old send result to use stanzas instead of ElementTree 2010-04-07 23:10:32 -07:00
Nathan Fritz
935ee4d14e changed license to MIT 2010-03-26 14:32:16 -07:00
Nathan Fritz
bf5dc0f7b8 closed bug #8 -- double auth response 2010-03-26 14:02:10 -07:00
Nathan Fritz
0fc9072e5d fixed bug #16 Roster not updating 2010-03-26 13:55:03 -07:00
Nathan Fritz
a8ff3586d3 * python 2.6 compatibility 2010-01-08 06:03:02 +00:00
Nathan Fritz
8854509ccd * started converstion to stanza objects 2009-12-11 01:29:46 +00:00
Nathan Fritz
a031dd24a6 tweaked stanzas for easy use 2009-12-10 07:33:59 +00:00
Nathan Fritz
007b04dd30 * added proper message and iq stanzas. presence left to do 2009-12-10 01:23:03 +00:00
Nathan Fritz
2349f849e3 bugfixes 2009-09-25 17:35:10 +00:00
Nathan Fritz
b9f7af885c * fixed some python3 transition bugs
* added status options to muc joining
2009-09-01 17:24:52 +00:00
Nathan Fritz
05c9ea5c1d * converted sleekxmpp to Python 3.x
* sleekxmpp no longer spawns threads for callback handlers -- there are now two threads: one for handlers and one for reading. callback handlers can get results from the read queue directly with the "wait" handler which is used in .send() for the reply catching argument.
2009-08-31 22:46:31 +00:00
Nathan Fritz
ce8bf4a367 made disconnect cleaner 2009-06-25 06:49:58 +00:00
Nathan Fritz
94f58ec3cb 2009-06-24 06:09:20 +00:00
Nathan Fritz
a9262c4e0a * bugfixes 2009-06-16 11:59:55 +00:00
Nathan Fritz
96b103b275 moved seesmic branch to trunk 2009-06-03 22:56:51 +00:00