- Add patch to avoid assertions when setting a GError that includes a '-'
in the enumeration value. Should fix #528897
This commit is contained in:
parent
cca98f008c
commit
fadb9d8eaf
@ -0,0 +1,39 @@
|
||||
From 35b30ed4f5e7678ab75affad0ec2fb1869eec384 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Mon, 1 Feb 2010 10:09:53 -0500
|
||||
Subject: [PATCH] Squash underscores and dashes in errors when converting to DBus errors
|
||||
|
||||
We were just taking the enumeration nick and appending to the DBus
|
||||
error name, but since these can contain '-' we need to squash.
|
||||
---
|
||||
dbus/dbus-gobject.c | 13 +++++++++++--
|
||||
1 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c
|
||||
index f75a3b1..9fca6a2 100644
|
||||
--- a/dbus/dbus-gobject.c
|
||||
+++ b/dbus/dbus-gobject.c
|
||||
@@ -1093,9 +1093,18 @@ gerror_domaincode_to_dbus_error_name (const DBusGObjectInfo *object_info,
|
||||
}
|
||||
else
|
||||
{
|
||||
- dbus_error_name = g_string_new (domain_str);
|
||||
+ char *domain_member, *code_member;
|
||||
+
|
||||
+ /* TODO should further validate these */
|
||||
+ domain_member = uscore_to_wincaps (domain_str);
|
||||
+ code_member = uscore_to_wincaps (code_str);
|
||||
+
|
||||
+ dbus_error_name = g_string_new (domain_member);
|
||||
g_string_append_c (dbus_error_name, '.');
|
||||
- g_string_append (dbus_error_name, code_str);
|
||||
+ g_string_append (dbus_error_name, code_member);
|
||||
+
|
||||
+ g_free (domain_member);
|
||||
+ g_free (code_member);
|
||||
}
|
||||
|
||||
return g_string_free (dbus_error_name, FALSE);
|
||||
--
|
||||
1.6.6
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
Summary: GLib bindings for D-Bus
|
||||
Name: dbus-glib
|
||||
Version: 0.84
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
URL: http://www.freedesktop.org/software/dbus/
|
||||
Source0: http://dbus.freedesktop.org/releases/dbus-glib/%{name}-%{version}.tar.gz
|
||||
License: AFL and GPLv2+
|
||||
@ -22,10 +22,11 @@ BuildRequires: libxml2-devel
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gettext
|
||||
BuildRequires: autoconf
|
||||
|
||||
# this patch requires autoreconf
|
||||
BuildRequires: autoconf automake libtool gettext-devel gtk-doc
|
||||
|
||||
Patch0: 0001-Squash-underscores-and-dashes-in-errors-when-convert.patch
|
||||
|
||||
%description
|
||||
|
||||
D-Bus add-on library to integrate the standard D-Bus library with
|
||||
@ -58,6 +59,7 @@ D-Bus tools written using the gtk+ GUI libaries
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
libtoolize --force --copy
|
||||
@ -115,6 +117,10 @@ rm -rf %{buildroot}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Feb 15 2010 Colin Walters <walters@verbum.org> - 0.84-2
|
||||
- Add patch to avoid assertions when setting a GError that
|
||||
includes a '-' in the enumeration value. Should fix #528897
|
||||
|
||||
* Wed Jan 27 2010 Colin Walters <walters@verbum.org> - 0.84-1
|
||||
- New upstream
|
||||
Has introspect.xml internally, drop it from here
|
||||
|
||||
Loading…
Reference in New Issue
Block a user