Bug 21502

Summary: ListTubes returns an empty dictionary for parameters
Product: Telepathy Reporter: Ben Schwartz <bens>
Component: tp-pythonAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED NOTABUG QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Ben Schwartz 2009-05-01 07:14:33 UTC
When using OfferStreamTube in one Sugar Activity, I set the Parameters argument to be a python dict with strings as keys and strings or ints as values.  I then connected a callback function to NewTube, and also called ListTubes with a reply callback function.

The Tube was apparently already available, so ListTubes replied with a non-empty list of tubes.  The list contained a single element (tube_info), whose params component was an empty dict: the debug trace shows dbus.Dictionary({}, signature=dbus.Signature('sv')).

This makes me suspect that the parameters dictionary is not hooked up correctly in ListTubes.

I am running OLPC OS builds 767 and 801. (i.e. 8.2 and 8.2.1).  I am not sure what Telepathy versions are present here.  Telepathy-gabble was in use, accessed via telepathy-python.
Comment 1 Ben Schwartz 2009-05-02 17:15:39 UTC
Just for fun I tried "dbus-ifying" the dictionary entirely before handing it to telepathy.  That is, instead of a dict, I created a dbus.Dictionary, with signature 'sv', with dbus.String keys and dbus.String values.

Unsurprisingly, this had no effect.
Comment 2 Ben Schwartz 2009-05-02 17:20:02 UTC
Tried it again with Salut. Same result.  Changing component to telepathy-python, seeing as neither Gabble nor Salut seems to pass along the parameters through ListTubes.
Comment 3 Ben Schwartz 2009-05-03 06:33:46 UTC
OK. I figured out what I was doing wrong.  I was following the argument spec from

http://telepathy.freedesktop.org/spec/org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.html#org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.OfferStreamTube

but actually, the function I was calling was

http://telepathy.freedesktop.org/spec/org.freedesktop.Telepathy.Channel.Type.Tubes.html#org.freedesktop.Telepathy.Channel.Type.Tubes.OfferStreamTube

Now it's working.

So this is not a bug, at least not in the code.  The spec could be a bit clearer...

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.