chiark / gitweb /
sd-bus: fix handling of double parameters in sd_bus_message_append()
[elogind.git] / src / libsystemd / sd-bus / bus-message.c
index 23076d25ddb3360b4a6848485633f79bed77a05c..9ae65bebc81e636a48ceb67abd1538d0a5706249 100644 (file)
@@ -2350,8 +2350,7 @@ int bus_message_append_ap(
                 }
 
                 case SD_BUS_TYPE_INT64:
-                case SD_BUS_TYPE_UINT64:
-                case SD_BUS_TYPE_DOUBLE: {
+                case SD_BUS_TYPE_UINT64: {
                         uint64_t x;
 
                         x = va_arg(ap, uint64_t);
@@ -2359,6 +2358,14 @@ int bus_message_append_ap(
                         break;
                 }
 
+                case SD_BUS_TYPE_DOUBLE: {
+                        double x;
+
+                        x = va_arg(ap, double);
+                        r = sd_bus_message_append_basic(m, *t, &x);
+                        break;
+                }
+
                 case SD_BUS_TYPE_STRING:
                 case SD_BUS_TYPE_OBJECT_PATH:
                 case SD_BUS_TYPE_SIGNATURE: {