summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Leblond <eric@regit.org>2014-02-04 09:27:45 +0100
committerEric Leblond <eric@regit.org>2014-02-22 22:49:33 +0100
commit5719f2713a8ce512d0361a5c0bc4d0e878117469 (patch)
tree7bff0138df35711d72070c3f89fc98fe93a5ffc0 /src
parent7a6c850e9f439b73e31f81dac6cb02b9bafbc866 (diff)
ulogd: add carriage return as separator
If the file is in DOS mode, the string coming from config file parsing are containing the carriage return. The result is that string are not correct and the parsing of confuguration file is failling.
Diffstat (limited to 'src')
-rw-r--r--src/conffile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conffile.c b/src/conffile.c
index b8e82a8..66769de 100644
--- a/src/conffile.c
+++ b/src/conffile.c
@@ -146,7 +146,7 @@ int config_parse_file(const char *section, struct config_keyset *kset)
return -ERRTOOLONG;
}
- if (!(wordend = get_word(line, " \t\n[]", (char *) wordbuf)))
+ if (!(wordend = get_word(line, " \t\n\r[]", (char *) wordbuf)))
continue;
pr_debug("word: \"%s\"\n", wordbuf);
if (!strcmp(wordbuf, section)) {
@@ -178,7 +178,7 @@ int config_parse_file(const char *section, struct config_keyset *kset)
return -ERRTOOLONG;
}
- if (!(wordend = get_word(line, " =\t\n", (char *) &wordbuf)))
+ if (!(wordend = get_word(line, " =\t\n\r", (char *) &wordbuf)))
continue;
if (wordbuf[0] == '[' ) {
@@ -195,7 +195,7 @@ int config_parse_file(const char *section, struct config_keyset *kset)
continue;
}
- wordend = get_word(wordend, " =\t\n", (char *) &wordbuf);
+ wordend = get_word(wordend, " =\t\n\r", (char *) &wordbuf);
args = (char *)&wordbuf;
if (ce->hit && !(ce->options & CONFIG_OPT_MULTI))