diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-10-06 14:56:19 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-10-06 14:56:19 +0200 |
commit | 7cfc028f6c1f7dfce7fa3b10f8ba9b49aa806c09 (patch) | |
tree | e5a3ce375c7c1a76b795768f9817a771c9c8ce6a /plugins | |
parent | 8b1d58dd39564fa97b5673f15db103c5b75ae5ab (diff) |
Check for HAL errors
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/hal.c | 6 |
1 files changed, 6 insertions, 0 deletions
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"); |