File: 01-return-error-code.patch

package info (click to toggle)
liboobs 3.0.0-4.4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,284 kB
  • sloc: sh: 10,131; ansic: 9,920; makefile: 176; xml: 1
file content (19 lines) | stat: -rw-r--r-- 795 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Author: Vlad Orlov <monsta@inbox.ru>
Description: Correctly return error code on unknown dbus errors.

Index: liboobs-3.0.0/oobs/oobs-object.c
===================================================================
--- liboobs-3.0.0.orig/oobs/oobs-object.c
+++ liboobs-3.0.0/oobs/oobs-object.c
@@ -400,7 +400,10 @@ run_message (OobsObject  *object,
       if (dbus_error_has_name (&priv->dbus_error, DBUS_ERROR_ACCESS_DENIED))
 	*result = OOBS_RESULT_ACCESS_DENIED;
       else
-	g_warning ("There was an unknown error communicating with the backends: %s", priv->dbus_error.message);
+	{
+	  *result = OOBS_RESULT_ERROR;
+	  g_warning ("There was an unknown error communicating with the backends: %s", priv->dbus_error.message);
+	}
 
       dbus_error_free (&priv->dbus_error);
       return NULL;