raiden00pl opened a new pull request, #4091:
URL: https://github.com/apache/nuttx-apps/pull/4091
## Summary
NuttX builtin apps share one image: .data and .bss are initialized once
at boot, not at every run. The libcoap examples assume a fresh process:
- a second coap_client run repeats its request forever (repeat_count is
0 and wraps around), sends options from the optlist freed by the
previous run and writes to the FILE it closed;
- a second coap_server run exits at once, because quit is still set by
the SIGINT that stopped the previous one.
Add a patch that restores the initial values of the example globals at
the start of main(). CMake and Make apply it after the download.
## Impact
Only the coap_client and coap_server examples change. The library is
not changed.
## Testing
sim, coap_client and coap_server run many times in one boot against the
host libcoap tools and node to node: before, the second coap_client run
fails or crashes the node; after, 16 of 16 runs pass (GET, PUT, POST,
DELETE, CON/NON, block-wise, observe, discovery, 4.04, IPv6, no server)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]