summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2011-04-04 12:02:27 +0200
committerNikola Pajkovsky <npajkovs@redhat.com>2011-04-04 12:02:27 +0200
commit90fe3a9d0cd766d18d1142d8d6981193a5715643 (patch)
tree7df1a3ef2b4fd08f706345a05b78526d5837eac2 /src/daemon
parent2ee0754ffb52a8bb65cb718189536b715e56f8d3 (diff)
downloadabrt-90fe3a9d0cd766d18d1142d8d6981193a5715643.zip
abrt-90fe3a9d0cd766d18d1142d8d6981193a5715643.tar.gz
abrt-90fe3a9d0cd766d18d1142d8d6981193a5715643.tar.xz
rhbz#692465 - Blacklist doesn't work
parse_value() doesn't trim the string. Lest say BlackList = coreutils, mono the parsed list looks like -> 'coreutils', ' mono' Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/Settings.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/daemon/Settings.cpp b/src/daemon/Settings.cpp
index e25b795..b3d1ade 100644
--- a/src/daemon/Settings.cpp
+++ b/src/daemon/Settings.cpp
@@ -64,11 +64,14 @@ static GList *parse_list(const char* list)
struct strbuf *item = strbuf_new();
GList *l = NULL;
+ char *trim_item = NULL;
+
for (unsigned ii = 0; list[ii]; ii++)
{
if (list[ii] == ',')
{
- l = g_list_append(l, xstrdup(item->buf));
+ trim_item = strtrim(item->buf);
+ l = g_list_append(l, xstrdup(trim_item));
strbuf_clear(item);
}
else
@@ -76,7 +79,10 @@ static GList *parse_list(const char* list)
}
if (item->len > 0)
- l = g_list_append(l, xstrdup(item->buf));
+ {
+ trim_item = strtrim(item->buf);
+ l = g_list_append(l, xstrdup(trim_item));
+ }
strbuf_free(item);
return l;