summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Klinikowski <kkszysiu@gmail.com>2010-05-27 00:35:42 +0200
committerKrzysztof Klinikowski <kkszysiu@gmail.com>2010-05-27 00:35:42 +0200
commit2cb7a81e98ea80a6b8d7b268562c2f17240ef40d (patch)
tree44a5d18b5fe197eeece3eed7e31c88920a59b454
parent1a14079510db6871c74588d8a44d6d6420e61d39 (diff)
Fixed contacts exporting for large lists.
-rwxr-xr-xsunshine/lqsoft/pygadu/twisted_protocol.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/sunshine/lqsoft/pygadu/twisted_protocol.py b/sunshine/lqsoft/pygadu/twisted_protocol.py
index ff99bba..f6e9aff 100755
--- a/sunshine/lqsoft/pygadu/twisted_protocol.py
+++ b/sunshine/lqsoft/pygadu/twisted_protocol.py
@@ -186,16 +186,18 @@ class GaduClient(Protocol):
def exportContactsList(self, xml):
klass = Resolver.by_name('ULRequestPacket')
- i = 0
+ #i = 0
- while len(xml) != 0:
- i = i +1
- batch, xml = xml[:2048], xml[2048:]
- if(i == 1):
- type = ULRequestPacket.TYPE.PUT
- else:
- type = ULRequestPacket.TYPE.PUT_MORE
- self._sendPacket(klass(type = type, data = batch))
+ #while len(xml) != 0:
+ # i = i +1
+ # batch, xml = xml[:2048], xml[2048:]
+ # if(i == 1):
+ # type = ULRequestPacket.TYPE.PUT
+ # else:
+ # type = ULRequestPacket.TYPE.PUT_MORE
+ # self._sendPacket(klass(type = type, data = batch))
+
+ self._sendPacket(klass(type = ULRequestPacket.TYPE.PUT, data = xml))
self._log("All contacts exported.")
def sendPing(self):