A callback to create/initialise the mqtt semaphore should possibly be added. In many RTOSes, a semaphore must be created/initialised at runtime before it can be used. A glue_lock_create() function in mongoose_glue.c and called early in mongoose_impl.c mongoose_init() would probably do (though initialising the semaphore earlier in the runtime might be wiser, in which case it would need to be a user problem after all... having a glue_lock_create() function would still be good though) #10
Please create a
glue_lock_init()
callback, in addition to glue_{lock,unlock}