]> git.meshlink.io Git - meshlink/commit
Move join state out of meshlink_handle_t, and ensure proper cleanup on errors.
authorGuus Sliepen <guus@meshlink.io>
Tue, 11 Feb 2020 20:37:33 +0000 (21:37 +0100)
committerGuus Sliepen <guus@meshlink.io>
Tue, 11 Feb 2020 20:37:33 +0000 (21:37 +0100)
commit543a5ecbb12d13350a345044632a6b6d04f3d640
tree9467d7fbf4dbc3cec28838123a2ea9fb08b120f0
parent2f9ce0a8f244306d8d5bc6a44963c73c0d9fae73
Move join state out of meshlink_handle_t, and ensure proper cleanup on errors.

Move the state we keep when calling meshlink_join() out of meshlink_handle_t
and just put it on the stack of meshlink_join(). Also make sure we properly
release allocated resources in all error conditions during a join.
src/meshlink.c
src/meshlink_internal.h