projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6aa682
)
client: Read D-Bus string type only if argument is 'Type'
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Fri, 7 Jun 2013 05:25:25 +0000
(08:25 +0300)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Fri, 7 Jun 2013 07:09:18 +0000
(10:09 +0300)
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
patch
|
blob
|
history
diff --git
a/client/agent.c
b/client/agent.c
index
afd265b
..
16d1928
100644
(file)
--- 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);
}