Reflect changes to the server object into the core stack #529
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updating the server object didn't have an impact after connecting to the server, so it was impossible to change the lifetime/binding after bootstrap. This modification catches writes to the lifetime object and immediately updates the internal representation of the server.
I'm not overly familiar with wakaama, so please check for any blatant errors! It seems a bit strange to have to extract the values from the server object using such a heavy-handed method, but it seems the stack is designed to keep the objects very detached from the wakaama internals. I was otherwise considering making the server object itself (object_server.c) modify the internal stack state (by directly accessing the server list), however the server object seems otherwise isolated from the exact instance it is attached to, so I tried to stay in the spirit of that.
Resolves #209
Related but unresolved: #355
Signed-off-by: Ciaran Woodward c.woodward@cascoda.com