From db6ec6b0d66beb54aed7573fe9b975631603a527 Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Fri, 7 Jun 2013 08:25:25 +0300 Subject: client: Read D-Bus string type only if argument is 'Type' A basic type was always read independent of the argument type which on some systems lead to a crash and on others only to a warning printout. --- client/agent.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/agent.c b/client/agent.c index afd265bc..16d1928c 100644 --- a/client/agent.c +++ b/client/agent.c @@ -386,10 +386,11 @@ static DBusMessage *agent_request_input(DBusConnection *connection, dbus_message_iter_recurse(&field_entry, &field_value); - dbus_message_iter_get_basic(&field_value, &value); - - if (strcmp(argument, "Type") == 0) + if (strcmp(argument, "Type") == 0) { + dbus_message_iter_get_basic(&field_value, + &value); attr_type = g_strdup(value); + } dbus_message_iter_next(&dict_entry); } -- cgit v1.2.3