Accepting request 526315 from home:fcrozat:branches:GNOME:Factory

- Rebase gvfs-nds.patch for gvfs 1.34.0, including identations and
  warnings fixes.

OBS-URL: https://build.opensuse.org/request/show/526315
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gvfs?expand=0&rev=280
This commit is contained in:
Dominique Leuenberger 2017-09-15 09:31:24 +00:00 committed by Git OBS Bridge
parent 2a02887306
commit 422e5fe7a9
2 changed files with 235 additions and 235 deletions

View File

@ -1,8 +1,9 @@
Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
Index: gvfs-1.34.0/daemon/gvfsbackendnds.c
===================================================================
--- /dev/null
+++ gvfs-1.9.0/daemon/gvfsbackendnds.c
@@ -0,0 +1,753 @@
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gvfs-1.34.0/daemon/gvfsbackendnds.c 2017-09-15 10:53:24.564258329 +0200
@@ -0,0 +1,747 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/* GIO - GLib Input, Output and Streaming Library
+ *
+ * Copyright (C) 2006-2007 Red Hat, Inc.
@ -68,7 +69,7 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ char *server;
+ char *mounted_server;
+
+ GMutex *entries_lock;
+ GMutex entries_lock;
+ GList *entries;
+ int entry_errno;
+};
@ -166,7 +167,7 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ if(backend->server != NULL)
+ g_free (backend->server);
+
+ g_mutex_free (backend->entries_lock);
+ g_mutex_clear (&backend->entries_lock);
+
+ g_list_foreach (backend->entries, (GFunc)browse_entry_free, NULL);
+ if(backend->entries != NULL)
@ -179,24 +180,22 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+static void
+g_vfs_backend_nds_init (GVfsBackendNds *backend)
+{
+ backend->entries_lock = g_mutex_new ();
+ g_mutex_init(&backend->entries_lock);
+
+ if (mount_tracker == NULL)
+ mount_tracker = g_mount_tracker_new (NULL);
+ mount_tracker = g_mount_tracker_new (NULL, FALSE);
+}
+
+
+static void
+update_cache (GVfsBackendNds *backend,const char *filename)
+{
+ GString *uri;
+ GList *entries;
+ int entry_errno;
+ char *objectname=NULL;
+ char *treename=NULL;
+ GList *objectlist=NULL;
+ GList *object=NULL;
+ GList *l;
+ FILE *fptr=NULL;
+ void *handle=NULL; //handle for dlopen
+ int res;
@ -293,9 +292,9 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+
+ if(entry_errno == 0)
+ {
+ g_mutex_lock (backend->entries_lock);
+ g_mutex_lock (&backend->entries_lock);
+ backend->entries = entries;
+ g_mutex_unlock (backend->entries_lock);
+ g_mutex_unlock (&backend->entries_lock);
+ }
+ backend->entry_errno = entry_errno;
+
@ -309,7 +308,6 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ GList *l;
+ char *end;
+ int len;
+ char *normalized;
+
+ while (*filename == '/')
+ filename++;
@ -344,6 +342,7 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+
+ if (found == NULL)
+ {
+ char *normalized;
+ /* That failed, try normalizing the filename */
+ normalized = normalize_nds_name (filename, len);
+
@ -390,7 +389,6 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ char *display_name;
+ char *icon;
+ GMountSpec *browse_mount_spec;
+ char *ptr = NULL;
+
+
+ icon = NULL;
@ -428,8 +426,7 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ gboolean is_automount)
+{
+ GVfsBackendNds *op_backend = G_VFS_BACKEND_NDS (backend);
+ char *server;
+ char *share;
+ const char *server;
+
+ server = g_mount_spec_get (mount_spec, "host");
+ if (server)
@ -452,18 +449,16 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ const char *filename,
+ GMountSource *mount_source)
+{
+ BrowseEntry *entry;
+ GError *error = NULL;
+ GMountSpec *mount_spec;
+
+ g_mutex_lock (backend->entries_lock);
+ g_mutex_lock (&backend->entries_lock);
+
+ backend->server = g_strdup(filename);
+
+ mount_spec = get_mount_spec_for_share (backend->server, filename);
+ g_vfs_job_mount_mountable_set_target (job, mount_spec, "/", TRUE);
+ g_mount_spec_unref (mount_spec);
+ g_mutex_unlock (backend->entries_lock);
+ g_mutex_unlock (&backend->entries_lock);
+
+ g_vfs_job_succeeded (G_VFS_JOB (job));
+}
@ -563,7 +558,6 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+static void
+get_file_info_from_entry (GVfsBackendNds *backend, BrowseEntry *entry, GFileInfo *info)
+{
+ GMountSpec *mount_spec;
+ GString *uri;
+ GIcon *icon;
+
@ -583,8 +577,6 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ g_object_unref (icon);
+ }
+
+ mount_spec = NULL;
+
+ g_file_info_set_file_type (info, G_FILE_TYPE_SHORTCUT);
+
+ uri = g_string_new ("nds://");
@ -606,14 +598,14 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+{
+ BrowseEntry *entry;
+
+ g_mutex_lock (backend->entries_lock);
+ g_mutex_lock (&backend->entries_lock);
+
+ entry = find_entry_unlocked (backend, filename);
+
+ if (entry)
+ get_file_info_from_entry (backend, entry, info);
+
+ g_mutex_unlock (backend->entries_lock);
+ g_mutex_unlock (&backend->entries_lock);
+
+ if (entry)
+ g_vfs_job_succeeded (G_VFS_JOB (job));
@ -684,7 +676,7 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ g_vfs_job_succeeded (G_VFS_JOB (job));
+
+ files = NULL;
+ g_mutex_lock (backend->entries_lock);
+ g_mutex_lock (&backend->entries_lock);
+ for (l = backend->entries; l != NULL; l = l->next)
+ {
+ BrowseEntry *entry = l->data;
@ -694,7 +686,7 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+
+ files = g_list_prepend (files, info);
+ }
+ g_mutex_unlock (backend->entries_lock);
+ g_mutex_unlock (&backend->entries_lock);
+
+ files = g_list_reverse (files);
+
@ -749,6 +741,8 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+ backend_class->try_query_info = try_query_info;
+ backend_class->enumerate = do_enumerate;
+ backend_class->try_enumerate = try_enumerate;
+ backend_class->try_mount_mountable = try_mount_mountable;
+ backend_class->mount_mountable = do_mount_mountable;
+}
+
+void
@ -756,10 +750,10 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.c
+{
+ g_set_application_name (_("Displaying Embedded Objects"));
+}
Index: gvfs-1.9.0/daemon/gvfsbackendnds.h
Index: gvfs-1.34.0/daemon/gvfsbackendnds.h
===================================================================
--- /dev/null
+++ gvfs-1.9.0/daemon/gvfsbackendnds.h
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gvfs-1.34.0/daemon/gvfsbackendnds.h 2017-09-15 10:53:56.159989373 +0200
@@ -0,0 +1,53 @@
+/* GIO - GLib Input, Output and Streaming Library
+ *
@ -814,11 +808,11 @@ Index: gvfs-1.9.0/daemon/gvfsbackendnds.h
+G_END_DECLS
+
+#endif /* __G_VFS_BACKEND_NDS_H__ */
Index: gvfs-1.9.0/daemon/Makefile.am
Index: gvfs-1.34.0/daemon/Makefile.am
===================================================================
--- gvfs-1.9.0.orig/daemon/Makefile.am
+++ gvfs-1.9.0/daemon/Makefile.am
@@ -143,6 +143,10 @@ mount_in_files += nvvfs.mount.in
--- gvfs-1.34.0.orig/daemon/Makefile.am 2017-09-15 10:15:10.715090208 +0200
+++ gvfs-1.34.0/daemon/Makefile.am 2017-09-15 10:15:46.554940823 +0200
@@ -144,6 +144,10 @@
mount_DATA += nvvfs.mount
libexec_PROGRAMS += gvfsd-nvvfs
@ -829,7 +823,7 @@ Index: gvfs-1.9.0/daemon/Makefile.am
EXTRA_DIST = \
$(service_in_files) \
$(systemd_user_in_files) \
@@ -525,6 +529,19 @@ gvfsd_http_CPPFLAGS = \
@@ -528,6 +532,19 @@
gvfsd_http_LDADD = $(libraries) $(HTTP_LIBS)
@ -849,10 +843,10 @@ Index: gvfs-1.9.0/daemon/Makefile.am
gvfsd_nvvfs_SOURCES = \
gvfsbackendnvvfs.c gvfsbackendnvvfs.h \
daemon-main.c daemon-main.h \
Index: gvfs-1.9.0/daemon/nds.mount.in
Index: gvfs-1.34.0/daemon/nds.mount.in
===================================================================
--- /dev/null
+++ gvfs-1.9.0/daemon/nds.mount.in
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gvfs-1.34.0/daemon/nds.mount.in 2017-09-15 10:15:46.554940823 +0200
@@ -0,0 +1,5 @@
+[Mount]
+Type=nds

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Sep 15 09:01:05 UTC 2017 - fcrozat@suse.com
- Rebase gvfs-nds.patch for gvfs 1.34.0, including identations and
warnings fixes.
-------------------------------------------------------------------
Mon Sep 11 16:31:55 UTC 2017 - dimstar@opensuse.org