chiark / gitweb /
bus-proxy: rename synthetic_reply_return_strv() to synthetic_reply_method_return_strv()
[elogind.git] / src / bus-proxyd / driver.c
index 23911c6a3c844b6db4bd57c88b71222f7107687a..bc2c0c86f33b5c22d7a2d098aed826b4ea5018aa 100644 (file)
@@ -305,7 +305,7 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli
                 /* Let's sort the names list to make it stable */
                 strv_sort(names);
 
                 /* Let's sort the names list to make it stable */
                 strv_sort(names);
 
-                return synthetic_reply_return_strv(m, names);
+                return synthetic_reply_method_return_strv(m, names);
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "ListNames")) {
                 _cleanup_strv_free_ char **names = NULL;
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "ListNames")) {
                 _cleanup_strv_free_ char **names = NULL;
@@ -324,10 +324,13 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli
                 /* Let's sort the names list to make it stable */
                 strv_sort(names);
 
                 /* Let's sort the names list to make it stable */
                 strv_sort(names);
 
-                return synthetic_reply_return_strv(m, names);
+                return synthetic_reply_method_return_strv(m, names);
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "ListQueuedOwners")) {
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "ListQueuedOwners")) {
-                struct kdbus_cmd_list cmd = {};
+                struct kdbus_cmd_list cmd = {
+                        .flags = KDBUS_LIST_QUEUED,
+                        .size = sizeof(cmd),
+                };
                 struct kdbus_info *name_list, *name;
                 _cleanup_strv_free_ char **owners = NULL;
                 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
                 struct kdbus_info *name_list, *name;
                 _cleanup_strv_free_ char **owners = NULL;
                 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
@@ -349,7 +352,6 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, NULL);
 
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, NULL);
 
-                cmd.flags = KDBUS_LIST_QUEUED;
                 r = ioctl(a->input_fd, KDBUS_CMD_LIST, &cmd);
                 if (r < 0)
                         return synthetic_reply_method_errno(m, -errno, NULL);
                 r = ioctl(a->input_fd, KDBUS_CMD_LIST, &cmd);
                 if (r < 0)
                         return synthetic_reply_method_errno(m, -errno, NULL);
@@ -387,7 +389,7 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli
                 if (err < 0)
                         return synthetic_reply_method_errno(m, err, NULL);
 
                 if (err < 0)
                         return synthetic_reply_method_errno(m, err, NULL);
 
-                return synthetic_reply_return_strv(m, owners);
+                return synthetic_reply_method_return_strv(m, owners);
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "NameHasOwner")) {
                 const char *name;
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "NameHasOwner")) {
                 const char *name;