Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util
diff options
context:
space:
mode:
authoramartin <olpc@xo-05-28-21.localdomain>2007-07-19 07:50:38 (GMT)
committer amartin <olpc@xo-05-28-21.localdomain>2007-07-19 07:50:38 (GMT)
commit90b9f37161f2535d844756cda4ea98cc63a400f8 (patch)
tree0c6d297335b2e84c30f7bda3e133311549563f53 /Util
parent3700e0ec7fa07eaeaa91898bde57a10e38697433 (diff)
network
Diffstat (limited to 'Util')
-rw-r--r--Util/Network.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Util/Network.py b/Util/Network.py
index 397110f..53a00e7 100644
--- a/Util/Network.py
+++ b/Util/Network.py
@@ -532,6 +532,7 @@ class Network:
con.waitingForData = self.unpacker.unpack_uint()
con.recvBuf = con.recvBuf[4:]
else:
+ print "waiting for data"
return # wait for more data
elif con.waitingForData:
@@ -540,8 +541,9 @@ class Network:
con.recvBuf = con.recvBuf[con.waitingForData:]
con.waitingForData = 0
for func in self.processMessage[con.message]:
- func( sock, con.message, data )
+ gobject.idle_add( func, sock, con.message, data )
else:
+ print "waiting for data"
return # wait for more data
else:
@@ -549,7 +551,8 @@ class Network:
if MSG_SIZE[con.message] == 0:
con.recvBuf = con.recvBuf[1:]
for func in self.processMessage[con.message]:
- func( sock, con.message, "" )
+ gobject.idle_add( func, sock, con.message, "" )
+
else:
con.waitingForData = MSG_SIZE[con.message]
con.recvBuf = con.recvBuf[1:]