[Telepathy-commits] [telepathy-haze/master] Add a random id to the stream opening instead of assuming buggy clients
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Jan 16 01:45:17 PST 2009
(Patch from Sjoerd Simons in Gabble commit 25e78355)
---
tests/twisted/hazetest.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tests/twisted/hazetest.py b/tests/twisted/hazetest.py
index 1291ab5..25aaa03 100644
--- a/tests/twisted/hazetest.py
+++ b/tests/twisted/hazetest.py
@@ -5,6 +5,7 @@ Infrastructure code for testing Haze by pretending to be a Jabber server.
import base64
import os
+import random
import sha
import sys
import time
@@ -99,7 +100,7 @@ class JabberAuthenticator(xmlstream.Authenticator):
def streamStarted(self, root=None):
if root:
- self.xmlstream.sid = root.getAttribute('id')
+ self.xmlstream.sid = '%x' % random.randint(1, sys.maxint)
self.xmlstream.sendHeader()
self.xmlstream.addOnetimeObserver(
--
1.5.6.5
More information about the Telepathy-commits
mailing list