Skip to content

Commit

Permalink
radio_mgr signal handler : safe cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikvs committed Feb 3, 2017
1 parent 9c8d46e commit c7d4b98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/pico_dev_radio_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ pico_radio_mgr_process(struct pollfd *fds, int n)
static void
pico_radio_mgr_quit(int signum)
{
struct pico_tree_node *i = NULL;
struct pico_tree_node *i = NULL, *tmp = NULL;
struct socket *key = NULL;
IGNORE_PARAMETER(signum);

dbg("Closing all sockets...");
pico_tree_foreach(i, &Sockets) {
pico_tree_foreach_safe(i, &Sockets, tmp) {
key = i->keyValue;
if (key) {
pico_tree_delete(&Sockets, key);
Expand Down

0 comments on commit c7d4b98

Please sign in to comment.