- Updated patch, fixed deadlock whilst mounting
This commit is contained in:
parent
7a4724ef20
commit
263f0c24d9
@ -1,15 +1,6 @@
|
||||
Index: daemon/obexftp-marshal.list
|
||||
===================================================================
|
||||
--- daemon/obexftp-marshal.list (revision 1964)
|
||||
+++ daemon/obexftp-marshal.list (working copy)
|
||||
@@ -1,2 +1,4 @@
|
||||
+VOID:STRING
|
||||
VOID:STRING,STRING
|
||||
+VOID:STRING,STRING,STRING
|
||||
VOID:STRING,STRING,UINT64
|
||||
Index: daemon/gvfsbackendobexftp.c
|
||||
===================================================================
|
||||
--- daemon/gvfsbackendobexftp.c (revision 1964)
|
||||
--- daemon/gvfsbackendobexftp.c (revision 2008)
|
||||
+++ daemon/gvfsbackendobexftp.c (working copy)
|
||||
@@ -96,6 +96,15 @@
|
||||
|
||||
@ -220,15 +211,16 @@ Index: daemon/gvfsbackendobexftp.c
|
||||
static void
|
||||
do_mount (GVfsBackend *backend,
|
||||
GVfsJobMount *job,
|
||||
@@ -590,7 +641,6 @@
|
||||
@@ -590,7 +641,7 @@
|
||||
const gchar *path = NULL;
|
||||
char *server;
|
||||
GMountSpec *obexftp_mount_spec;
|
||||
- gboolean connected;
|
||||
+ guint count;
|
||||
|
||||
g_print ("+ do_mount\n");
|
||||
|
||||
@@ -616,10 +666,11 @@
|
||||
@@ -616,10 +667,11 @@
|
||||
}
|
||||
|
||||
/* FIXME, Have a way for the mount to be cancelled, see:
|
||||
@ -242,7 +234,7 @@ Index: daemon/gvfsbackendobexftp.c
|
||||
DBUS_TYPE_G_OBJECT_PATH, &path, G_TYPE_INVALID) == FALSE)
|
||||
{
|
||||
g_free (op_backend->bdaddr);
|
||||
@@ -676,14 +727,10 @@
|
||||
@@ -676,14 +728,20 @@
|
||||
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_INVALID);
|
||||
|
||||
/* Now wait until the device is connected */
|
||||
@ -252,29 +244,46 @@ Index: daemon/gvfsbackendobexftp.c
|
||||
- g_usleep (G_USEC_PER_SEC / 100);
|
||||
- connected = is_connected (op_backend->session_proxy, G_VFS_JOB (job));
|
||||
- }
|
||||
+ while (op_backend->status == ASYNC_PENDING)
|
||||
+ g_cond_wait (op_backend->cond, op_backend->mutex);
|
||||
+ count = 0;
|
||||
+ g_mutex_lock (op_backend->mutex);
|
||||
|
||||
- if (connected < 0)
|
||||
+ if (op_backend->status == ASYNC_ERROR)
|
||||
+ while (op_backend->status == ASYNC_PENDING && count < 100) {
|
||||
+ GTimeVal val;
|
||||
+ g_get_current_time (&val);
|
||||
+ g_time_val_add (&val, 100000);
|
||||
+ count++;
|
||||
+ if (g_cond_timed_wait (op_backend->cond, op_backend->mutex, &val) != FALSE)
|
||||
+ break;
|
||||
+ }
|
||||
+ g_mutex_unlock (op_backend->mutex);
|
||||
+
|
||||
+ if (op_backend->status == ASYNC_ERROR || op_backend->status == ASYNC_PENDING)
|
||||
{
|
||||
g_message ("mount failed, didn't connect");
|
||||
|
||||
@@ -694,11 +741,10 @@
|
||||
@@ -694,12 +752,17 @@
|
||||
g_object_unref (op_backend->session_proxy);
|
||||
op_backend->session_proxy = NULL;
|
||||
|
||||
- g_vfs_job_failed (G_VFS_JOB (job),
|
||||
- G_IO_ERROR, G_IO_ERROR_BUSY,
|
||||
- _("Connection to the device lost"));
|
||||
+ if (op_backend->status != ASYNC_PENDING)
|
||||
+ g_vfs_job_failed_from_error (G_VFS_JOB (job), op_backend->error);
|
||||
+ else
|
||||
+ g_vfs_job_failed (G_VFS_JOB (job),
|
||||
+ G_IO_ERROR, G_IO_ERROR_BUSY,
|
||||
+ _("Connection to the device lost"));
|
||||
return;
|
||||
}
|
||||
+ op_backend->status = ASYNC_PENDING;
|
||||
|
||||
+ op_backend->status = ASYNC_PENDING;
|
||||
+
|
||||
g_vfs_job_succeeded (G_VFS_JOB (job));
|
||||
|
||||
@@ -1482,6 +1528,12 @@
|
||||
g_print ("- do_mount\n");
|
||||
@@ -1482,6 +1545,12 @@
|
||||
/* TransferStarted */
|
||||
dbus_g_object_register_marshaller(obexftp_marshal_VOID__STRING_STRING_UINT64,
|
||||
G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_INVALID);
|
@ -1,7 +1,7 @@
|
||||
Summary: Backends for the gio framework in GLib
|
||||
Name: gvfs
|
||||
Version: 0.99.8
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.gtk.org
|
||||
@ -30,7 +30,7 @@ BuildRequires: automake autoconf
|
||||
BuildRequires: libtool
|
||||
Patch1: gvfs-0.99.2-archive-integration.patch
|
||||
|
||||
Patch2: gvfs-obexftp-updated-apis.patch
|
||||
Patch2: gvfs-obexftp-updated-apis-2.patch
|
||||
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=524498
|
||||
Patch3: gvfs-0.99.8-smb-kerberos-auth.patch
|
||||
@ -255,6 +255,9 @@ update-desktop-database &> /dev/null ||:
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Sep 19 2008 - Bastien Nocera <bnocera@redhat.com> - 0.99.8-5
|
||||
- Updated patch, fixed deadlock whilst mounting
|
||||
|
||||
* Wed Sep 17 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.99.8-4
|
||||
- Actually apply the kerberos patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user