chiark / gitweb /
remove unused includes
[elogind.git] / src / libsystemd / sd-bus / test-bus-zero-copy.c
index a054f74bf3b74da5d7427aebe763aada9ca0c3bb..2d062fc9b5009eb61ee96360ea8be68ecf059c1a 100644 (file)
@@ -19,7 +19,6 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <fcntl.h>
 #include <sys/mman.h>
 
 #include "util.h"
@@ -28,7 +27,6 @@
 
 #include "sd-bus.h"
 #include "bus-message.h"
-#include "bus-error.h"
 #include "bus-kernel.h"
 #include "bus-dump.h"
 
@@ -39,6 +37,7 @@
 
 int main(int argc, char *argv[]) {
         _cleanup_free_ char *name = NULL, *bus_name = NULL, *address = NULL;
+        const char *unique;
         uint8_t *p;
         sd_bus *a, *b;
         int r, bus_ref;
@@ -81,7 +80,10 @@ int main(int argc, char *argv[]) {
         r = sd_bus_start(b);
         assert_se(r >= 0);
 
-        r = sd_bus_message_new_method_call(b, &m, ":1.1", "/a/path", "an.inter.face", "AMethod");
+        r = sd_bus_get_unique_name(a, &unique);
+        assert_se(r >= 0);
+
+        r = sd_bus_message_new_method_call(b, &m, unique, "/a/path", "an.inter.face", "AMethod");
         assert_se(r >= 0);
 
         r = sd_bus_message_open_container(m, 'r', "aysay");