summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-07-24 01:31:33 +0200
committerLennart Poettering <lennart@poettering.net>2008-07-24 01:31:33 +0200
commit888256b0be254f20e291ffdec8b109fb0ada4dd0 (patch)
treed82f3c1fe254ae224e942ff86ad6a63bd79355e6 /src/modules
parente7b9da320993840f21f6208ba8a209865fca37ab (diff)
reset dbus error struct before retrying parsing messages
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/module-console-kit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
index 5a3975fb..829b43b1 100644
--- a/src/modules/module-console-kit.c
+++ b/src/modules/module-console-kit.c
@@ -94,6 +94,8 @@ static void add_session(struct userdata *u, const char *id) {
/* CK 0.3 this changed from int32 to uint32 */
if (!dbus_message_get_args(reply, &error, DBUS_TYPE_UINT32, &uid, DBUS_TYPE_INVALID)) {
+ dbus_error_free(&error);
+
if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &uid, DBUS_TYPE_INVALID)) {
pa_log("Failed to parse GetUnixUser() result: %s: %s", error.name, error.message);
goto fail;
@@ -167,6 +169,8 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
/* CK API changed to match spec in 0.3 */
if (!dbus_message_get_args(message, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) {
+ dbus_error_free(&error);
+
if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID)) {
pa_log_error("Failed to parse SessionAdded message: %s: %s", error.name, error.message);
goto finish;
@@ -179,6 +183,8 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
/* CK API changed to match spec in 0.3 */
if (!dbus_message_get_args(message, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) {
+ dbus_error_free(&error);
+
if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID)) {
pa_log_error("Failed to parse SessionRemoved message: %s: %s", error.name, error.message);
goto finish;