]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix handling of DBus errors emitted by the bus itself
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 22 Jul 2013 15:32:28 +0000 (16:32 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 23 Jul 2013 21:35:26 +0000 (22:35 +0100)
Current code for handling dbus errors only works for errors
received from the remote application itself. We must also
handle errors emitted by the bus itself, for example, when
it fails to spawn the target service.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/virdbus.c

index 6221bdc4da0a376528cf08ea3c6b258adad115f2..9b0977a5f6de5aa0fa5230010d7ebba82454e849 100644 (file)
@@ -1129,9 +1129,8 @@ int virDBusCallMethod(DBusConnection *conn,
                                                             call,
                                                             VIR_DBUS_METHOD_CALL_TIMEOUT_MILLIS,
                                                             &error))) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Cannot send to %s.%s on path %s with interface %s: %s"),
-                       destination, member, path, interface, NULLSTR(error.message));
+        virReportDBusServiceError(error.message ? error.message : "unknown error",
+                                  error.name);
         goto cleanup;
     }