Commit 81c0b221 authored by Rahix's avatar Rahix
Browse files

Merge 'Clear config before reloading'

Closes #211

See merge request card10/firmware!411
parents c6a8a430 539b02ec
......@@ -246,6 +246,21 @@ void load_config(void)
return;
}
/* Clear any existing configuration */
/* Don't free the blocks as we are most likely
* going to re-use all of them. */
config_block *current;
if (config_data != NULL) {
current = config_data;
while (true) {
memset(current->slots, 0, sizeof(current->slots));
if (current->next == NULL) {
break;
}
current = current->next;
}
}
char buf[128];
int nread;
parser_state s;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment