gvfs/gvfs-1.6.2-stringv-dbus.patch

38 lines
1.2 KiB
Diff

From 0b1f1c87a01027459300b5965895def84286a361 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Thu, 29 Apr 2010 16:27:46 +0200
Subject: [PATCH] Fix stringv transfer over dbus
The wrong iterator passed in caused some items to be silently dropped
plus it led to string dup of wrong pointer.
See bug 614544 for reference.
---
common/gvfsdaemonprotocol.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/common/gvfsdaemonprotocol.c b/common/gvfsdaemonprotocol.c
index 7feefeb..9070cbc 100644
--- a/common/gvfsdaemonprotocol.c
+++ b/common/gvfsdaemonprotocol.c
@@ -128,6 +128,7 @@ _g_dbus_attribute_as_pointer (GFileAttributeType type,
case G_FILE_ATTRIBUTE_TYPE_STRING:
case G_FILE_ATTRIBUTE_TYPE_BYTE_STRING:
case G_FILE_ATTRIBUTE_TYPE_OBJECT:
+ case G_FILE_ATTRIBUTE_TYPE_STRINGV:
return value->ptr;
default:
return (gpointer) value;
@@ -372,7 +373,7 @@ _g_dbus_get_file_attribute (DBusMessageIter *iter,
{
char **strv;
int n_elements;
- if (!_g_dbus_message_iter_get_args (iter, NULL,
+ if (!_g_dbus_message_iter_get_args (&variant_iter, NULL,
DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &strv, &n_elements,
0))
goto error;
--
1.7.0.1