summaryrefslogtreecommitdiffstats
path: root/src/Daemon/PluginManager.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-02-12 16:13:43 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2010-02-12 16:13:43 +0100
commitfd889cd72bd75634ed269e561c26732bd9e4a6e1 (patch)
tree633822db37f9fb1cd4bea97eb7cf467510e4461e /src/Daemon/PluginManager.cpp
parentd862c355099cddbd01a719029ce2161a4a6cc05d (diff)
parent5c273a5686f8d002a16183f44f73b4f50a03e799 (diff)
Merge branch 'master' into rhel6
Diffstat (limited to 'src/Daemon/PluginManager.cpp')
-rw-r--r--src/Daemon/PluginManager.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp
index e63cb3a..f01d943 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.