-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: Make client context available in de-registration callback #666
base: main
Are you sure you want to change the base?
server: Make client context available in de-registration callback #666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did this get tested? Any chance for an automated test?
Remove the client context from server only after calling the monitoring callback when handling a de-registration. A as result, the client information is still available in the server context during the callback. Signed-off-by: Marc Lasch <[email protected]>
18f08f9
to
715f274
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just changing the interface of the monitor callback to include a reference to client instead of just the clientID? This way, the client reference can (not sure if sensible) be removed from the list before calling the monitor callback.
break; | ||
|
||
default: | ||
fprintf(stdout, "\r\nMonitor callback called with an unknown status: %d.\r\n", status); | ||
break; | ||
} | ||
prv_dump_client(clientP); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended to do this even when returning COAP_202_DELETED?
Remove the client from server context only after calling the monitoring callback when handling a de-registration. A as result, the client information is still available in the server context during the callback.
Signed-off-by: Marc Lasch [email protected]