Hi Johan, >> static bool get_discoverable_timeout(void) >> { >> - DBG("Not implemented"); >> + struct hal_ev_adapter_props_changed *ev; >> + int len; >> >> - /* TODO: Add implementation */ >> + len = sizeof(*ev) + sizeof(struct hal_property) + sizeof(uint32_t); >> > > The dynamic memory allocation seems a bit overkill here since the size is > not very big and can be determined even at compile time. I'd consider > doing something like: > > uint8_t buf[sizeof(struct hal_ev_adapter_props_changed) + > sizeof(struct hal_property) + sizeof(uint32_t)]; > struct hal_ev_adapter_props_changed *ev = (void *) buf; actually having some #define for the base len would be easier to read. uint8_t buf[BASELEN + sizeof(uint32_t)); > > ... > > ipc_send(..., sizeof(buf), buf, ...); Of course an alternative is to use alloca to just allocate on the stack. Then no free is actually needed. Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html