src/ie.c:33: error: conflicting types for 'dect_ie_alloc'
include/dect/ie.h:49: error: previous declaration of 'dect_ie_alloc' was here
src/ie.c:44: error: conflicting types for 'dect_ie_alloc'
include/dect/ie.h:49: error: previous declaration of 'dect_ie_alloc' was here
Signed-off-by: Patrick McHardy <kaber@trash.net>
Appending to the list is broken and always overwrites the pointer to the
first member. Additionally lists contained in messages are not freed.
Signed-off-by: Patrick McHardy <kaber@trash.net>
The intended use is to store the generic reference in a typed pointer, currently
requiring a cast for every use.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Currently the parameters of the registered primitive callbacks are allocated
on the stack, meaning they can only be used in the callback itself and are
destroyed immediately after it returns.
This is unsuitable in combination with MM procedurs, which might interrupt
or delay other procedures, which later on need to be resumed, presumably
with the original parameters.
Introduce a common dynamically allocated and reference counted container
(struct dect_ie_collection) for collections of IEs/IE lists and use it
for callback parameters.
Signed-off-by: Patrick McHardy <kaber@trash.net>