#include "kdbus-enum.h"
#define POOL_SIZE (16 * 1024LU * 1024LU)
-static struct conn *
-__kdbus_hello(const char *path, uint64_t flags,
- const struct kdbus_item *item, size_t item_size)
+struct conn *
+kdbus_hello(const char *path, uint64_t flags,
+ const struct kdbus_item *item, size_t item_size)
{
int fd, ret;
struct {
return conn;
}
-struct conn *kdbus_hello(const char *path, uint64_t flags)
-{
- return __kdbus_hello(path, flags, NULL, 0);
-}
-
struct conn *
kdbus_hello_registrar(const char *path, const char *name,
const struct kdbus_policy_access *access,
item = KDBUS_ITEM_NEXT(item);
}
- return __kdbus_hello(path, flags, items, size);
+ return kdbus_hello(path, flags, items, size);
}
struct conn *kdbus_hello_activator(const char *path, const char *name,
char *msg_id(uint64_t id, char *buf);
int msg_send(const struct conn *conn, const char *name, uint64_t cookie,
uint64_t flags, uint64_t timeout, int64_t priority, uint64_t dst_id);
-struct conn *kdbus_hello(const char *path, uint64_t hello_flags);
+struct conn *kdbus_hello(const char *path, uint64_t hello_flags,
+ const struct kdbus_item *item, size_t item_size);
+
struct conn *kdbus_hello_registrar(const char *path, const char *name,
const struct kdbus_policy_access *access,
size_t num_access, uint64_t flags);
if (!activator)
return EXIT_FAILURE;
- conn_a = kdbus_hello(bus, 0);
+ conn_a = kdbus_hello(bus, 0, NULL, 0);
if (!conn_a)
return EXIT_FAILURE;
if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
return EXIT_FAILURE;
- conn_a = kdbus_hello(bus, 0);
+ conn_a = kdbus_hello(bus, 0, NULL, 0);
if (!conn_a)
return EXIT_FAILURE;
- conn_b = kdbus_hello(bus, 0);
+ conn_b = kdbus_hello(bus, 0, NULL, 0);
if (!conn_b)
return EXIT_FAILURE;
if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
return EXIT_FAILURE;
- conn_a = kdbus_hello(bus, 0);
- conn_b = kdbus_hello(bus, 0);
+ conn_a = kdbus_hello(bus, 0, NULL, 0);
+ conn_b = kdbus_hello(bus, 0, NULL, 0);
if (!conn_a || !conn_b)
return EXIT_FAILURE;
if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
return EXIT_FAILURE;
- conn = kdbus_hello(bus, 0);
+ conn = kdbus_hello(bus, 0, NULL, 0);
if (!conn)
return EXIT_FAILURE;
printf(" Created connection %llu on bus '%s'\n", (unsigned long long)conn->id, bus_make.name);
return EXIT_FAILURE;
for (ret = 0; ret < random() % 20; ret++) {
- struct conn *conn = kdbus_hello(bus, 0);
+ struct conn *conn = kdbus_hello(bus, 0, NULL, 0);
if (conn)
add_fd(conn->fd);
}
return EXIT_FAILURE;
}
- conn = kdbus_hello(bus, KDBUS_HELLO_MONITOR);
+ conn = kdbus_hello(bus, KDBUS_HELLO_MONITOR, NULL, 0);
if (!conn) {
fprintf(stderr, "Unable to connect as monitor: %m\n");
return EXIT_FAILURE;
conn_db[i] = NULL;
/* We need to create connections here */
- conn_db[i] = kdbus_hello(bus, 0);
+ conn_db[i] = kdbus_hello(bus, 0, NULL, 0);
if (!conn_db[i]) {
ret = -errno;
break;
if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
return EXIT_FAILURE;
- conn_a = kdbus_hello(bus, 0);
- conn_b = kdbus_hello(bus, 0);
+ conn_a = kdbus_hello(bus, 0, NULL, 0);
+ conn_b = kdbus_hello(bus, 0, NULL, 0);
if (!conn_a || !conn_b)
return EXIT_FAILURE;
if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
return EXIT_FAILURE;
- conn_a = kdbus_hello(bus, 0);
- conn_b = kdbus_hello(bus, 0);
+ conn_a = kdbus_hello(bus, 0, NULL, 0);
+ conn_b = kdbus_hello(bus, 0, NULL, 0);
if (!conn_a || !conn_b)
return EXIT_FAILURE;
if (asprintf(&bus, "/dev/" KBUILD_MODNAME "/%s/bus", bus_make.name) < 0)
return EXIT_FAILURE;
- conn_a = kdbus_hello(bus, 0);
- conn_b = kdbus_hello(bus, 0);
+ conn_a = kdbus_hello(bus, 0, NULL, 0);
+ conn_b = kdbus_hello(bus, 0, NULL, 0);
if (!conn_a || !conn_b)
return EXIT_FAILURE;