diff options
author | Susant Sahani <ssahani@users.noreply.github.com> | 2016-06-09 21:11:35 +0530 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-06-09 17:41:35 +0200 |
commit | 52e045f9b8c3228db8ef2d8b53e099c654056fcc (patch) | |
tree | 58e16df19e1795cba30a1cf892138b46750c75df /src/shared/bus-util.c | |
parent | a3071999b83f53b37b24140baf64ef771b9f3e26 (diff) | |
download | systemd-52e045f9b8c3228db8ef2d8b53e099c654056fcc.tar.gz systemd-52e045f9b8c3228db8ef2d8b53e099c654056fcc.tar.bz2 systemd-52e045f9b8c3228db8ef2d8b53e099c654056fcc.zip |
bus_util: add support to map double (#3479)
Now we don't support parsing double at map_basic.
when trying to use bus_message_map_all_properties with a double
this fails. Let's add it.
Diffstat (limited to 'src/shared/bus-util.c')
-rw-r--r-- | src/shared/bus-util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index 4efbf3710f..8cfa936347 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -1085,6 +1085,19 @@ static int map_basic(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_ break; } + case SD_BUS_TYPE_DOUBLE: { + double d; + double *p = userdata; + + r = sd_bus_message_read_basic(m, type, &d); + if (r < 0) + break; + + *p = d; + + break; + } + default: break; } |