]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Fix the issue with tos-deluge not timing out properly.
authorrazvanm <razvanm>
Tue, 19 Jan 2010 00:45:53 +0000 (00:45 +0000)
committerrazvanm <razvanm>
Tue, 19 Jan 2010 00:45:53 +0000 (00:45 +0000)
support/sdk/python/tos.py
tools/tinyos/misc/tos-deluge

index 330df0c2a4c66b29f6790805e70b8a947eda2188..dee4de43af77364e5d3abbcfeb4d61ce6222d280 100644 (file)
@@ -448,6 +448,8 @@ class AM(SimpleAM):
         r = super(AM, self).write(packet, amId, timeout, blocking)
         while not r:
             r = super(AM, self).write(packet, amId, timeout, blocking, inc=0)
+            if timeout and not r:
+               raise Timeout
         return True
 
 
index 78b0f6625d78ad2a80602f595fc29c382c4bcad2..21d7727f96a61142d82f6678bfc70ce06d4b7274 100755 (executable)
@@ -416,7 +416,7 @@ if len(sys.argv) >= 3:
 
     try:
         print "Checking if node is a Deluge T2 base station ..."
-        ident(timeout=5)
+        ident(timeout=1)
     except tos.Timeout:
         print "ERROR: Timeout. Is the node a Deluge T2 base station?"
         sys.exit(-1)