summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-12-13 23:08:04 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-12-13 23:08:04 +0100
commit529935edd6733438531232b28174541ca6f92692 (patch)
treedb2a57af7d2fd1710ac89005c8e81d21c829b937
parent53f90e86aa6268565688c7ccf1d6cc9f7748b8be (diff)
downloadabrt-529935edd6733438531232b28174541ca6f92692.tar.gz
abrt-529935edd6733438531232b28174541ca6f92692.tar.xz
abrt-529935edd6733438531232b28174541ca6f92692.zip
small fixes to map_string_t conversion suggested by Karel
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r--doc/interpreted-languages2
-rw-r--r--src/cli/report.cpp16
-rw-r--r--src/daemon/PluginManager.cpp1
3 files changed, 10 insertions, 9 deletions
diff --git a/doc/interpreted-languages b/doc/interpreted-languages
index e79a1321..0853556d 100644
--- a/doc/interpreted-languages
+++ b/doc/interpreted-languages
@@ -66,7 +66,7 @@ archive, a script file, a bytecode file, or the interpreter. It should
be a real file on the filesystem, so ABRT can check the origin of the
file (source package). If the file is not known, the most appropriate
is to shortly describe the reason why it is not known in the field.
-However, exceptions raised from interactive shell (a common reason
+However, exceptions raised from interactive shell (a common reason
for unknown file) are hardly useful and should not be reported.
ANALYZER
diff --git a/src/cli/report.cpp b/src/cli/report.cpp
index f87486a7..8b8f9cc6 100644
--- a/src/cli/report.cpp
+++ b/src/cli/report.cpp
@@ -518,10 +518,10 @@ static GHashTable *get_reporter_plugin_settings(const vector_string_t& reporters
if (homedir)
{
GHashTableIter iter;
- char *key;
- map_string_t *value;
+ char *plugin_name;
+ map_string_t *plugin_settings;
g_hash_table_iter_init(&iter, settings);
- while (g_hash_table_iter_next(&iter, (void**)&key, (void**)&value))
+ while (g_hash_table_iter_next(&iter, (void**)&plugin_name, (void**)&plugin_settings))
{
/* Load plugin config in the home dir. Do not skip lines
* with empty value (but containing a "key="),
@@ -529,7 +529,7 @@ static GHashTable *get_reporter_plugin_settings(const vector_string_t& reporters
* from /etc/abrt/plugins/foo.conf, but he prefers to
* enter it every time he reports. */
map_string_h *single_plugin_settings = new_map_string();
- char *path = xasprintf("%s/.abrt/%s.conf", homedir, key);
+ char *path = xasprintf("%s/.abrt/%s.conf", homedir, plugin_name);
bool success = load_conf_file(path, single_plugin_settings, /*skip key w/o values:*/ false);
free(path);
if (!success)
@@ -540,11 +540,11 @@ static GHashTable *get_reporter_plugin_settings(const vector_string_t& reporters
/* Merge user's plugin settings into already loaded settings */
GHashTableIter iter2;
- char *key2;
- char *value2;
+ char *key;
+ char *value;
g_hash_table_iter_init(&iter2, single_plugin_settings);
- while (g_hash_table_iter_next(&iter2, (void**)&key2, (void**)&value2))
- (*value)[key2] = xstrdup(value2);
+ while (g_hash_table_iter_next(&iter2, (void**)&key, (void**)&value))
+ (*plugin_settings)[key] = xstrdup(value);
free_map_string(single_plugin_settings);
}
diff --git a/src/daemon/PluginManager.cpp b/src/daemon/PluginManager.cpp
index f8f6b8f8..161256c5 100644
--- a/src/daemon/PluginManager.cpp
+++ b/src/daemon/PluginManager.cpp
@@ -149,6 +149,7 @@ CPlugin* CPluginManager::LoadPlugin(const char *pName, bool enabled_only)
plugin_info["WWW"] = empty;
plugin_info["GTKBuilder"] = empty;
VERB3 log("Plugin %s: 'Enabled' is not set, not loading it (yet)", pName);
+ free_map_string(pluginSettings);
return NULL; /* error */
}
}