summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2010-04-02 17:37:27 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2010-04-02 17:40:33 +0100
commita06ed99dffe7696f35fb1939893bf83ac0628a64 (patch)
tree5e48beb62790b0fe71ed2694b6ec5b954d332d12
parent33aa0bdd942b7b4f2b6b8fd45c165a61fec3257a (diff)
conn: allow TargetHandle=0 when TargetHandleType=NONE
Thanks to Krzysztof Klinikowski for the initial patch. Fixes fd.o#27378 Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--NEWS9
-rw-r--r--src/server/conn.py4
2 files changed, 11 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index a0a27ef..71482a1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+telepathy-python 0.15.18 (UNRELEASED)
+=====================================
+
+Enhancements:
+
+Fixes:
+
+ * fd.o#27378: allow TargetHandle=0 when TargetHandleType=NONE.
+
telepathy-python 0.15.17 (2010-03-12)
=====================================
diff --git a/src/server/conn.py b/src/server/conn.py
index bf2d8a3..ecd6b16 100644
--- a/src/server/conn.py
+++ b/src/server/conn.py
@@ -450,9 +450,9 @@ class ConnectionInterfaceRequests(
target_id = props.get(CHANNEL_INTERFACE + '.TargetID', None)
# Handle type 0 cannot have a handle.
- if target_handle_type == HANDLE_TYPE_NONE and target_handle != None:
+ if target_handle_type == HANDLE_TYPE_NONE and target_handle not in (None, 0):
raise InvalidArgument('When TargetHandleType is NONE, ' +
- 'TargetHandle must be omitted')
+ 'TargetHandle must be omitted or 0')
# Handle type 0 cannot have a TargetID.
if target_handle_type == HANDLE_TYPE_NONE and target_id != None: