diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2013-09-21 22:22:27 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-09-30 10:48:09 +0200 |
commit | bdc3babbe21e5fed06876db4d56d1b13915fe1cb (patch) | |
tree | cc894424b80866d330faadf67e1e7d03e4f151c3 /client | |
parent | a1dd98ffa979441a0b9db3289287eaeab2c1aadf (diff) | |
download | gvfs-bdc3babbe21e5fed06876db4d56d1b13915fe1cb.tar.gz |
daemon: Emit signal before returning dbus value
In gvfsjobopenforread.c, the dbus method returns a value in create_reply
which eventually results in a GVfsJobRead job to be sent to the backend.
This could happen before the "new-source" signal is emitted. If this
happens, the job is not queued because the "new_job" signal would not
have been connected to a job source yet. The read then hangs because
the GVfsJobRead is lost.
This is hit often when performing large smb transfers (see
https://bugzilla.gnome.org/show_bug.cgi?id=697782 and
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1075923).
It can be reproduced by putting a small sleep before the
g_signal_emit_by_name call.
Fix this by emitting the "new-source" signal *before* the dbus method
value is returned. This ensures that the "new_job" signal is set up
before any further jobs are sent.
Note that the same problem and solution applies for
gvfsjobopenforwrite.c.
Diffstat (limited to 'client')
0 files changed, 0 insertions, 0 deletions