From 7cfc028f6c1f7dfce7fa3b10f8ba9b49aa806c09 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 6 Oct 2008 14:56:19 +0200 Subject: Check for HAL errors --- plugins/hal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/hal.c b/plugins/hal.c index e2189b49..3502926e 100644 --- a/plugins/hal.c +++ b/plugins/hal.c @@ -47,6 +47,12 @@ static void formfactor_reply(DBusPendingCall *call, void *user_data) reply = dbus_pending_call_steal_reply(call); + if (dbus_set_error_from_message(NULL, reply) == TRUE) { + error("Failed to access HAL"); + dbus_message_unref(reply); + return; + } + if (dbus_message_get_args(reply, NULL, DBUS_TYPE_STRING, &formfactor, DBUS_TYPE_INVALID) == FALSE) { error("Wrong formfactor arguments"); -- cgit