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.
Created attachment 33434 [details] unit test for sending data before the peer accepts the FT attachment failed, reattaching.
I've fixed the bug and added the new unit test to the test suite (with a small change compared to the attached version). You can find it here : http://git.collabora.co.uk/?p=user/kakaroto/telepathy-gabble.git;a=shortlog;h=refs/heads/misc Waiting for review/merge.
reopening bug until it gets reviewed/merged.
setting url and reassigning to self
Merged into masted! Thanks sjoerd for the review
Closing bug
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.