Bug 27378

Summary: Bad target type checking for handle type 0.
Product: Telepathy Reporter: Krzysztof Klinikowski <kkszysiu>
Component: tp-pythonAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: major    
Priority: medium CC: kkszysiu
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
Whiteboard: minor changes needed
i915 platform: i915 features:
Attachments: patch

Description Krzysztof Klinikowski 2010-03-30 13:36:26 UTC
Created attachment 34548 [details] [review]
patch

tp-python have bad checking for target handle. It checking just is TargetHandle == None but it's never None I think. Correct checking should check is TargetHandle == 0. Without that ListRooms channel cannot be created.
Comment 1 Simon McVittie 2010-03-31 05:07:57 UTC
Yes, this is a bug; requesting channels with (TargetHandleType=NONE, TargetHandle=0) should be allowed.

The InvalidArgument error message should also be changed to say "... omitted or 0", and the patch could be simplified by using "target_handle not in (0, None)". I'll leave it to telepathy-python people to apply this.
Comment 2 Jonny Lamb 2010-04-02 09:41:54 UTC
Thanks for your patch. I made the changes Simon suggested and pushed to master.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.