-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REMOVEME? gcoap: reuse existing request memo for observe registrations
This is ugly but maybe helps discussing the underlying problem. This is meant to allow sending an explicit deregistration request (which has to use the same token as the initial registration request), whithout creating a duplicate memo entry. The desired functionality is that a gcoap client is able to to tell the server that it is not interested in a particular observe anymore. Since the gcoap_req_send API takes a prepared buffer it is pretty clumsy to do some checks that could be done a lot easier with access to the PDU: 'is this an observe (de)-register request?', and if so, get and reuse the same memo & token. This code assumes that the request already got the correct token injected. This should happen *after* gcoap_req_init() called, before sneding the request and is currently not part of the test application.
- Loading branch information
1 parent
f070ed5
commit 4256885
Showing
3 changed files
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters