[gnome-packagekit] Do not try to map the PkClientError to a GpkDbusError if the domain is already correct. Fixes rh#598
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Do not try to map the PkClientError to a GpkDbusError if the domain is already correct. Fixes rh#598
- Date: Fri, 18 Jun 2010 15:13:13 +0000 (UTC)
commit 62d8ebcff648716da82ed5339709f6c050921e78
Author: Richard Hughes <richard hughsie com>
Date: Fri Jun 18 16:12:23 2010 +0100
Do not try to map the PkClientError to a GpkDbusError if the domain is already correct. Fixes rh#598677
src/gpk-dbus-task.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 4576d01..3c73705 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -401,6 +401,13 @@ gpk_dbus_task_get_code_from_gerror (const GError *error)
{
gint code = GPK_DBUS_ERROR_INTERNAL_ERROR;
+ /* already correct */
+ if (error->domain == GPK_DBUS_ERROR) {
+ code = error->code;
+ goto out;
+ }
+
+ /* not recognised */
if (error->domain != PK_CLIENT_ERROR) {
egg_warning ("Not a PkClientError error code");
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]