git » pytipc » commit e9467d9

Handle the new address format in send_subscr().

author Alberto Bertogli
2007-12-17 03:31:25 UTC
committer Alberto Bertogli
2007-12-17 03:31:42 UTC
parent 82c2f18377b65b166d3d1437219508a72029a16c

Handle the new address format in send_subscr().

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

tipc.py +5 -1

diff --git a/tipc.py b/tipc.py
index 032f0f4..c3595a3 100644
--- a/tipc.py
+++ b/tipc.py
@@ -137,7 +137,11 @@ class TIPCSocket:
 		if not timeout:
 			timeout = TIPC_WAIT_FOREVER
 
-		atype, stype, lower, upper = addr
+		atype, stype, lower, upper = addr[:4]
+
+		if atype == TIPC_ADDR_NAME:
+			upper = lower
+
 		subs = tipc_ll.build_subscr(stype, lower, upper,
 				timeout, filter)
 		self.send(subs)