Fixed segfault when ListNames is called, but the method is still not working propoerly
(returns nothing).
Change-Id: I1c55b8efb99ba540e6547c0f0b2d5f713d385f98
Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com>
cmd.flags = KDBUS_NAME_LIST_NAMES; //TODO add handling | KDBUS_NAME_LIST_UNIQUE;
again:
- if(ioctl(fd, KDBUS_CMD_NAME_LIST, cmd))
+ if(ioctl(fd, KDBUS_CMD_NAME_LIST, &cmd))
{
if(errno == EINTR)
goto again;
for (name = name_list->names; (uint8_t *)(name) < (uint8_t *)(name_list) + name_list->size; name = KDBUS_PART_NEXT(name))
list_len++;
+ _dbus_verbose ("Name list size: %llu\n", name_list->size);
+ _dbus_verbose ("List len: %d\n", list_len);
+
list = malloc(sizeof(char*) * (list_len + 1));
if(list == NULL)
goto out;
cmd_name->flags = flags_kdbus;
cmd_name->id = id;
- // cmd_name->conn_flags = 0;
_dbus_verbose("Request name - flags sent: 0x%llx !!!!!!!!!\n", cmd_name->flags);
(typeof(part))(((uint8_t *)part) + KDBUS_ALIGN8((part)->size))
#define KDBUS_MSG_MAX_PAYLOAD_VEC_SIZE 0x00800000 /* maximum size of message header and items */
#define KDBUS_PART_HEADER_SIZE offsetof(struct kdbus_item, data)
-
#define KDBUS_PART_SIZE(s) KDBUS_ALIGN8((s) + KDBUS_PART_HEADER_SIZE)
//todo restore if DBus policy will be applied in kdbus somehow