From: Susant Sahani Date: Thu, 9 Jun 2016 15:41:35 +0000 (+0530) Subject: bus_util: add support to map double (#3479) X-Git-Tag: v231.3~106 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=2a66b8a6446a876696fe59cbb0c4dcdee8cf41a7;p=elogind.git 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. --- diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index def432489..12b091ceb 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -1089,6 +1089,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; }