diff options
-rw-r--r-- | client/gvfsfusedaemon.c | 2 | ||||
-rw-r--r-- | common/gmountsource.c | 6 | ||||
-rw-r--r-- | common/gmounttracker.c | 1 | ||||
-rw-r--r-- | daemon/gvfsbackendafc.c | 2 | ||||
-rw-r--r-- | daemon/gvfsbackendftp.c | 2 | ||||
-rw-r--r-- | daemon/gvfsbackendgphoto2.c | 2 | ||||
-rw-r--r-- | daemon/gvfsbackendnetwork.c | 2 | ||||
-rw-r--r-- | daemon/gvfsbackendobexftp.c | 3 | ||||
-rw-r--r-- | daemon/gvfsbackendsmbbrowse.c | 3 | ||||
-rw-r--r-- | daemon/gvfsdaemon.c | 2 | ||||
-rw-r--r-- | daemon/gvfsftpdircache.c | 1 | ||||
-rw-r--r-- | daemon/trashlib/trashexpunge.c | 3 |
12 files changed, 25 insertions, 4 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c index 5e79638d..d8a13e5e 100644 --- a/client/gvfsfusedaemon.c +++ b/client/gvfsfusedaemon.c @@ -212,6 +212,7 @@ file_handle_new (const gchar *path) file_handle = g_new0 (FileHandle, 1); file_handle->refcount = 1; + g_mutex_init (&file_handle->mutex); file_handle->op = FILE_OP_NONE; file_handle->path = g_strdup (path); @@ -2372,7 +2373,6 @@ vfs_destroy (gpointer param) mount_list_free (); if (subthread_main_loop != NULL) g_main_loop_quit (subthread_main_loop); - g_mutex_clear (&mount_list_mutex); g_object_unref (gvfs); } diff --git a/common/gmountsource.c b/common/gmountsource.c index af89ed29..cf567fcb 100644 --- a/common/gmountsource.c +++ b/common/gmountsource.c @@ -380,6 +380,8 @@ g_mount_source_ask_password (GMountSource *source, AskSyncData data; memset (&data, 0, sizeof (data)); + g_mutex_init (&data.mutex); + g_cond_init (&data.cond); g_mutex_lock (&data.mutex); @@ -549,6 +551,8 @@ g_mount_source_ask_question (GMountSource *source, AskSyncData data; memset (&data, 0, sizeof (data)); + g_mutex_init (&data.mutex); + g_cond_init (&data.cond); g_mutex_lock (&data.mutex); g_mount_source_ask_question_async (source, @@ -842,6 +846,8 @@ g_mount_source_show_processes (GMountSource *source, AskSyncData data; memset (&data, 0, sizeof (data)); + g_mutex_init (&data.mutex); + g_cond_init (&data.cond); g_mutex_lock (&data.mutex); g_mount_source_show_processes_async (source, diff --git a/common/gmounttracker.c b/common/gmounttracker.c index 135a2b25..3c6a8eb9 100644 --- a/common/gmounttracker.c +++ b/common/gmounttracker.c @@ -541,6 +541,7 @@ init_connection (GMountTracker *tracker) static void g_mount_tracker_init (GMountTracker *tracker) { + g_mutex_init (&tracker->lock); } diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c index 84227ed2..cade065b 100644 --- a/daemon/gvfsbackendafc.c +++ b/daemon/gvfsbackendafc.c @@ -2600,6 +2600,8 @@ g_vfs_backend_afc_init (GVfsBackendAfc *self) /* enable full debugging */ idevice_set_debug_level (1); } + + g_mutex_init (&self->apps_lock); } static void diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c index 3883ca3b..c92a9f9a 100644 --- a/daemon/gvfsbackendftp.c +++ b/daemon/gvfsbackendftp.c @@ -395,6 +395,8 @@ g_vfs_backend_ftp_finalize (GObject *object) static void g_vfs_backend_ftp_init (GVfsBackendFtp *ftp) { + g_mutex_init (&ftp->mutex); + g_cond_init (&ftp->cond); } static void diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c index 9a1b6d82..403d5e7a 100644 --- a/daemon/gvfsbackendgphoto2.c +++ b/daemon/gvfsbackendgphoto2.c @@ -1712,6 +1712,8 @@ do_mount (GVfsBackend *backend, gphoto2_backend->free_space = -1; + g_mutex_init (&gphoto2_backend->lock); + gphoto2_mount_spec = g_mount_spec_new ("gphoto2"); g_mount_spec_set (gphoto2_mount_spec, "host", host); g_vfs_backend_set_mount_spec (backend, gphoto2_mount_spec); diff --git a/daemon/gvfsbackendnetwork.c b/daemon/gvfsbackendnetwork.c index 3c385141..b83f2783 100644 --- a/daemon/gvfsbackendnetwork.c +++ b/daemon/gvfsbackendnetwork.c @@ -769,6 +769,8 @@ g_vfs_backend_network_init (GVfsBackendNetwork *network_backend) const char * const* supported_vfs; int i; + g_mutex_init (&network_backend->smb_mount_lock); + supported_vfs = g_vfs_get_supported_uri_schemes (g_vfs_get_default ()); network_backend->have_smb = FALSE; diff --git a/daemon/gvfsbackendobexftp.c b/daemon/gvfsbackendobexftp.c index 62fe32fd..a27e55bd 100644 --- a/daemon/gvfsbackendobexftp.c +++ b/daemon/gvfsbackendobexftp.c @@ -530,6 +530,9 @@ g_vfs_backend_obexftp_init (GVfsBackendObexftp *backend) return; } + g_mutex_init (&backend->mutex); + g_cond_init (&backend->cond); + backend->manager_proxy = dbus_g_proxy_new_for_name (backend->connection, "org.openobex", "/org/openobex", diff --git a/daemon/gvfsbackendsmbbrowse.c b/daemon/gvfsbackendsmbbrowse.c index f1055c57..56de3a9b 100644 --- a/daemon/gvfsbackendsmbbrowse.c +++ b/daemon/gvfsbackendsmbbrowse.c @@ -244,6 +244,9 @@ g_vfs_backend_smb_browse_init (GVfsBackendSmbBrowse *backend) char *workgroup; GSettings *settings; + g_mutex_init (&backend->entries_lock); + g_mutex_init (&backend->update_cache_lock); + if (mount_tracker == NULL) mount_tracker = g_mount_tracker_new (NULL); diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c index 4f59b942..82399238 100644 --- a/daemon/gvfsdaemon.c +++ b/daemon/gvfsdaemon.c @@ -158,6 +158,8 @@ g_vfs_daemon_init (GVfsDaemon *daemon) /* TODO: verify thread_pool != NULL in a nicer way */ g_assert (daemon->thread_pool != NULL); + g_mutex_init (&daemon->lock); + daemon->mount_counter = 0; daemon->jobs = NULL; diff --git a/daemon/gvfsftpdircache.c b/daemon/gvfsftpdircache.c index 49023b1e..e316eac1 100644 --- a/daemon/gvfsftpdircache.c +++ b/daemon/gvfsftpdircache.c @@ -114,6 +114,7 @@ g_vfs_ftp_dir_cache_new (const GVfsFtpDirFuncs *funcs) g_vfs_ftp_file_equal, (GDestroyNotify) g_vfs_ftp_file_free, (GDestroyNotify) g_vfs_ftp_dir_cache_entry_unref); + g_mutex_init (&cache->lock); cache->funcs = funcs; return cache; diff --git a/daemon/trashlib/trashexpunge.c b/daemon/trashlib/trashexpunge.c index 677fb81b..db3e70ca 100644 --- a/daemon/trashlib/trashexpunge.c +++ b/daemon/trashlib/trashexpunge.c @@ -107,9 +107,6 @@ trash_expunge (GFile *directory) { trash_expunge_queue = g_hash_table_new (g_file_hash, (GEqualFunc) g_file_equal); - g_mutex_init (&trash_expunge_lock); - g_cond_init (&trash_expunge_wait); - g_once_init_leave (&trash_expunge_initialised, 1); } |