captivectrl: Skip all lines that start with #

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2016-02-08 16:37:21 +00:00
parent 07d56062a9
commit 76ece32362

View File

@@ -71,6 +71,10 @@ static client_t* read_clients(char* filename) {
if (line[strlen(line) - 1] == '\n')
line[strlen(line) - 1] = '\0';
// Skip all commented lines
if (*line == '#')
continue;
client_curr = (client_t*)malloc(sizeof(client_t));
memset(client_curr, 0, sizeof(client_t));