[libvirt] [PATCH] Fix handling of DBus errors emitted by the bus itself

From: "Daniel P. Berrange" <berrange@redhat.com> 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/virdbus.c b/src/util/virdbus.c index ee99f7f..e3d172e 100644 --- a/src/util/virdbus.c +++ b/src/util/virdbus.c @@ -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; } -- 1.8.1.4

On 07/23/2013 07:52 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
ACK. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Daniel P. Berrange
-
Eric Blake