[Bug 26658] New: Gabble asserts if the UI sends data before the FT channel is OPEN

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 19 20:33:24 CET 2010


http://bugs.freedesktop.org/show_bug.cgi?id=26658

           Summary: Gabble asserts if the UI sends data before the FT
                    channel is OPEN
           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: youness.alaoui at collabora.co.uk


Hi,

I noticed there's a bug in gabble where it would be using a variable before
it's assigned a value (self->priv->bytestream) in ft-channel.c
This could happen if the UI connects and starts sending data over the
UI<->gabble socket after it calls ProvideFile and before the FT channel's state
becomes OPEN.

The transport_handler (called when we receive data on the socket between gabble
and UI), calls gabble_bytestream_iface_send and uses the
self->priv->bytestream. That variable is only set when we call set_bytestream
which is called in the callback of gabble_bytestream_factory_negotiate_stream
which itself is only called after the remote accepts our FT. So as long as the
peer doesn't accept our stream, bytestream is NULL.

Attached is a unit test to be added in the tests/twisted/file-transfer
directory (and adding it to the Makefile.am). This will send the data, then
accept the file and continue.. It will eventually timeout (if it doesn't throw
a 'Broken Pipe' exception during the send) and you can look at the log to see
this :
GLib-GObject-WARNING **: 2010-02-19 14:28:22.982356: invalid (NULL) pointer
instance
aborting...

I will soon provide a patch for this as it seems easy to fix.


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



More information about the telepathy-bugs mailing list