[arch-commits] Commit in gvfs/trunk (2 files)

Jan Steffens heftig at archlinux.org
Tue Oct 13 19:11:58 UTC 2015


    Date: Tuesday, October 13, 2015 @ 21:11:57
  Author: heftig
Revision: 249229

fix various problems

Added:
  gvfs/trunk/0001-filemonitor-Take-a-ref-on-the-GDBusConnection.patch
Modified:
  gvfs/trunk/PKGBUILD

----------------------------------------------------------+
 0001-filemonitor-Take-a-ref-on-the-GDBusConnection.patch |   38 +++++++++++++
 PKGBUILD                                                 |    9 ++-
 2 files changed, 44 insertions(+), 3 deletions(-)

Added: 0001-filemonitor-Take-a-ref-on-the-GDBusConnection.patch
===================================================================
--- 0001-filemonitor-Take-a-ref-on-the-GDBusConnection.patch	                        (rev 0)
+++ 0001-filemonitor-Take-a-ref-on-the-GDBusConnection.patch	2015-10-13 19:11:57 UTC (rev 249229)
@@ -0,0 +1,38 @@
+From f498019527eda13e52e23ab5d9d56146a37af796 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 13 Oct 2015 21:00:57 +0200
+Subject: [PATCH] filemonitor: Take a ref on the GDBusConnection
+
+The initial ref is owned by the thread-local connection cache.
+We unref the connection when we finalize - oops.
+---
+ client/gdaemonfilemonitor.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/client/gdaemonfilemonitor.c b/client/gdaemonfilemonitor.c
+index 313b06f..644aecb 100644
+--- a/client/gdaemonfilemonitor.c
++++ b/client/gdaemonfilemonitor.c
+@@ -181,8 +181,8 @@ g_daemon_file_monitor_new (const char *remote_id,
+   daemon_monitor->remote_id = g_strdup (remote_id);
+   daemon_monitor->remote_obj_path = g_strdup (remote_obj_path);
+ 
+-  daemon_monitor->connection = _g_dbus_connection_get_sync (daemon_monitor->remote_id, NULL, &error);
+-  if (daemon_monitor->connection == NULL)
++  connection = _g_dbus_connection_get_sync (daemon_monitor->remote_id, NULL, &error);
++  if (connection == NULL)
+     {
+       g_printerr ("Error getting connection for monitoring: %s (%s, %d)\n",
+                   error->message, g_quark_to_string (error->domain), error->code);
+@@ -190,6 +190,8 @@ g_daemon_file_monitor_new (const char *remote_id,
+     }
+   else
+     {
++      daemon_monitor->connection = g_object_ref (connection);
++
+       if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (daemon_monitor->skeleton),
+                                              daemon_monitor->connection,
+                                              daemon_monitor->object_path,
+-- 
+2.6.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-10-13 18:29:02 UTC (rev 249228)
+++ PKGBUILD	2015-10-13 19:11:57 UTC (rev 249229)
@@ -4,7 +4,7 @@
 pkgbase=gvfs
 pkgname=(gvfs gvfs-{smb,afc,gphoto2,goa,mtp,nfs,google})
 pkgver=1.26.1
-pkgrel=2
+pkgrel=3
 arch=(i686 x86_64)
 license=(LGPL)
 makedepends=(avahi dbus fuse intltool libarchive libcdio-paranoia libgphoto2 libimobiledevice
@@ -12,11 +12,14 @@
              libbluray libgudev libnfs libgdata)
 url="http://www.gnome.org"
 groups=(gnome)
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver:0:4}/$pkgbase-$pkgver.tar.xz)
-sha256sums=('1c6e8ee47486646102d0bc8f4062362908968c0a24d68a7c5e57a103ab0b6380')
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver:0:4}/$pkgbase-$pkgver.tar.xz
+        0001-filemonitor-Take-a-ref-on-the-GDBusConnection.patch)
+sha256sums=('1c6e8ee47486646102d0bc8f4062362908968c0a24d68a7c5e57a103ab0b6380'
+            '4ac4a12ef896f1ad702d67ea3d2ae2a663e89ed0571629849c1fc20ce087f796')
 
 prepare() {
   cd "$pkgbase-$pkgver"
+  patch -Np1 -i ../0001-filemonitor-Take-a-ref-on-the-GDBusConnection.patch
 }
 
 build() {



More information about the arch-commits mailing list