diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-02-15 18:09:55 +0100 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-02-15 18:09:55 +0100 |
commit | d93fc21129f08a149d7a1bb042179942485fcedb (patch) | |
tree | 72ec4eb636b15d8e2385f068881f86a6aa88db2b /src/Daemon/PluginManager.cpp | |
parent | deef343e0372b0a167f1d35f9ef9d18694aa9a0e (diff) | |
parent | 3a0729e697b24d4d30e3a1a008f83ca605aaad5d (diff) | |
download | abrt-d93fc21129f08a149d7a1bb042179942485fcedb.tar.gz abrt-d93fc21129f08a149d7a1bb042179942485fcedb.tar.xz abrt-d93fc21129f08a149d7a1bb042179942485fcedb.zip |
Merge branch 'master' into bugzilla
Diffstat (limited to 'src/Daemon/PluginManager.cpp')
-rw-r--r-- | src/Daemon/PluginManager.cpp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp index e63cb3ac..f01d9435 100644 --- a/src/Daemon/PluginManager.cpp +++ b/src/Daemon/PluginManager.cpp @@ -80,60 +80,6 @@ static const char *const plugin_type_str[] = { }; -bool LoadPluginSettings(const char *pPath, map_plugin_settings_t& pSettings) -{ - FILE *fp = fopen(pPath, "r"); - if (!fp) - return false; - - char line[512]; - while (fgets(line, sizeof(line), fp)) - { - strchrnul(line, '\n')[0] = '\0'; - unsigned ii; - bool is_value = false; - bool valid = false; - bool in_quote = false; - string key; - string value; - for (ii = 0; line[ii] != '\0'; ii++) - { - if (line[ii] == '"') - { - in_quote = !in_quote; - } - if (isspace(line[ii]) && !in_quote) - { - continue; - } - if (line[ii] == '#' && !in_quote && key == "") - { - break; - } - if (line[ii] == '=' && !in_quote) - { - is_value = true; - continue; - } - if (!is_value) - { - key += line[ii]; - } - else - { - valid = true; - value += line[ii]; - } - } - if (valid && !in_quote) - { - pSettings[key] = value; - } - } - fclose(fp); - return true; -} - /** * A function. It saves settings. On success it returns true, otherwise returns false. * @param path A path of config file. |