[Bug 27918] New: Callback for _gabble_connection_send_with_reply() may never be called.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 30 21:37:51 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=27918

           Summary: Callback for _gabble_connection_send_with_reply() may
                    never be called.
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: gabble
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: will.thompson at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org


So... I was reviewing some code today, and was getting annoyed that
_gabble_connection_send_with_reply() can return either synchronously or
asynchronously. So I had a poke at its implementation.

• _gabble_connection_send_with_reply() calls lm_connection_send_with_reply().
• lm_connection_send_with_reply() calls wocky_porter_send_iq_async, passing
iq_reply_cb() as the callback.
• iq_reply_cb() in lib/loudmouth/lm-connection.c calls 
wocky_porter_send_iq_finish(), and if it gets no reply, does not call the
callback passed to _gabble_connection_send_with_reply()! So if you get
disconnected, your callback will never be called, and we leak and/or die later.

I took a look at about half of the callbacks passed to
_gabble_connection_send_with_reply() — it's actually only called 37 times — and
the callbacks do indeed all assume that the reply message is not NULL. So...
this seems pretty broken to me.

I think the right fix is to just remove one or more layers of wrapper around
wocky_porter_send_iq_async(), to be honest.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list