diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-09-24 16:54:42 +0200 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-09-24 17:34:14 +0200 |
commit | 1700823abdad4acd36640efb07f74af93a4d5280 (patch) | |
tree | 6cf4ec03f9ec6f8f1dae2ca141ee7a700c2daa4e /src/daemon/Settings.cpp | |
parent | 675d5159fbb9f5f760549a694543cd47f3638cac (diff) | |
download | abrt-1700823abdad4acd36640efb07f74af93a4d5280.tar.gz abrt-1700823abdad4acd36640efb07f74af93a4d5280.tar.xz abrt-1700823abdad4acd36640efb07f74af93a4d5280.zip |
g_settings_setBlackListedPaths uses GList
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'src/daemon/Settings.cpp')
-rw-r--r-- | src/daemon/Settings.cpp | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/src/daemon/Settings.cpp b/src/daemon/Settings.cpp index ca4764b2..81b66613 100644 --- a/src/daemon/Settings.cpp +++ b/src/daemon/Settings.cpp @@ -53,8 +53,8 @@ bool g_settings_bOpenGPGCheck = false; /* one line: "OpenGPGPublicKeys = value1,value2" */ GList *g_settings_setOpenGPGPublicKeys = NULL; GList *g_settings_setBlackListedPkgs = NULL; -set_string_t g_settings_setBlackListedPaths; std::string g_settings_sDatabase; +GList *g_settings_setBlackListedPaths = NULL; std::string g_settings_sWatchCrashdumpArchiveDir; unsigned int g_settings_nMaxCrashReportsSize = 1000; bool g_settings_bProcessUnpackaged = false; @@ -96,32 +96,6 @@ static GList *parse_list(const char* list) return l; } - -// function will be removed -static set_string_t ParseList(const char* pList) -{ - unsigned ii; - std::string item; - set_string_t set; - for (ii = 0; pList[ii]; ii++) - { - if (pList[ii] == ',') - { - set.insert(item); - item = ""; - } - else - { - item += pList[ii]; - } - } - if (item != "") - { - set.insert(item); - } - return set; -} - /* Format: name, name(param),name("param with spaces \"and quotes\"") */ static vector_pair_string_string_t ParseListWithArgs(const char *pValue, int *err) { @@ -233,7 +207,7 @@ static int ParseCommon() it = s_mapSectionCommon.find("BlackListedPaths"); if (it != end) { - g_settings_setBlackListedPaths = ParseList(it->second.c_str()); + g_settings_setBlackListedPaths = parse_list(it->second.c_str()); } it = s_mapSectionCommon.find("Database"); if (it != end) @@ -596,4 +570,9 @@ void settings_free() free((char*)li->data); g_list_free(g_settings_setBlackListedPkgs); + + for (GList *li = g_settings_setBlackListedPaths; li != NULL; li = g_list_next(li)) + free((char*)li->data); + + g_list_free(g_settings_setBlackListedPaths); } |