summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-06-03 10:11:38 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-06-07 07:08:47 (GMT)
commita6aa682808efc88680bb6e5e90cf61e07c15454a (patch)
treeda804913b70c1857c72d8be2efbdd588e381fdb1 /client
parent9a048c1e0c1dda4497a0f767f7bf56622012d6d1 (diff)
downloadconnman-a6aa682808efc88680bb6e5e90cf61e07c15454a.zip
connman-a6aa682808efc88680bb6e5e90cf61e07c15454a.tar.gz
connman-a6aa682808efc88680bb6e5e90cf61e07c15454a.tar.bz2
client: Pretty-print D-Bus signed integers
To keep it more logical, rename the unsigned variable in the code.
Diffstat (limited to 'client')
-rw-r--r--client/dbus_helpers.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/dbus_helpers.c b/client/dbus_helpers.c
index 4913b68..5345d05 100644
--- a/client/dbus_helpers.c
+++ b/client/dbus_helpers.c
@@ -35,7 +35,8 @@ void __connmanctl_dbus_print(DBusMessageIter *iter, const char *pre,
int arg_type;
dbus_bool_t b;
unsigned char c;
- unsigned int i;
+ dbus_uint32_t u;
+ dbus_int32_t i;
double d;
char *str;
@@ -98,6 +99,11 @@ void __connmanctl_dbus_print(DBusMessageIter *iter, const char *pre,
case DBUS_TYPE_UINT16:
case DBUS_TYPE_UINT32:
+ dbus_message_iter_get_basic(iter, &u);
+ fprintf(stdout, "%d", u);
+ break;
+
+ case DBUS_TYPE_INT32:
dbus_message_iter_get_basic(iter, &i);
fprintf(stdout, "%d", i);
break;