mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-28 09:37:09 +03:00
client code: Make sure static variables are re-initialized if needed
For embedded applications that can call the 'main()' function multiple times, they need to have any statically (globally) defined variables reset to their default values.
This commit is contained in:
1 parent
0de22aae0b
commit
d0bfbb7ac8
3 files changed
+23
-14
No files matched your search
@@ -260,6 +260,8 @@ client_coap_init(int argc, char **argv)
|
||||
fail:
|
||||
/* Clean up library usage so client can be run again */
|
||||
quit = 0;
|
||||
is_mcast = 0;
|
||||
wait_seconds = DEFAULT_WAIT_TIME; /* default timeout in seconds */
|
||||
coap_delete_optlist(optlist);
|
||||
optlist = NULL;
|
||||
coap_session_release(session);
|
||||
|
||||
Reference in new issue
Block a user