Skip to content
Snippets Groups Projects
Commit d02bfcd2 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

config: skip empty lines and comments (starting with #)

parent 2f29043b
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,9 @@ parse_commands_file (struct WpDaemonData *d, GInputStream * stream,
/* tokenize and execute */
cmd = strtok_r (linestart, " ", &saveptr);
if (!g_strcmp0 (cmd, "load-module")) {
if (!cmd || cmd[0] == '#') {
/* empty line or comment, skip */
} else if (!g_strcmp0 (cmd, "load-module")) {
abi = strtok_r (NULL, " ", &saveptr);
module = strtok_r (NULL, " ", &saveptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment