summaryrefslogtreecommitdiffstats
path: root/src/daemon/MiddleWare.cpp
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2011-04-06 17:56:04 +0200
committerNikola Pajkovsky <npajkovs@redhat.com>2011-04-06 17:56:04 +0200
commitc7f1777a5d9c62a1a42f7058de0a7b5bfccc5794 (patch)
tree6ba56a8ba760d6150c1ecee1980c6a4dc0839294 /src/daemon/MiddleWare.cpp
parent9cd3eb3d3fbf73524d313cfaa1a81873f2e301a8 (diff)
downloadabrt-c7f1777a5d9c62a1a42f7058de0a7b5bfccc5794.tar.gz
abrt-c7f1777a5d9c62a1a42f7058de0a7b5bfccc5794.tar.xz
abrt-c7f1777a5d9c62a1a42f7058de0a7b5bfccc5794.zip
cleanup: get rid of GetPluginsInfo dbus call
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'src/daemon/MiddleWare.cpp')
-rw-r--r--src/daemon/MiddleWare.cpp60
1 files changed, 2 insertions, 58 deletions
diff --git a/src/daemon/MiddleWare.cpp b/src/daemon/MiddleWare.cpp
index ffc2d633..051ffacc 100644
--- a/src/daemon/MiddleWare.cpp
+++ b/src/daemon/MiddleWare.cpp
@@ -140,7 +140,8 @@ static mw_result_t CreateCrashReport(const char *dump_dir_name,
if (!uid_matches)
{
dd_close(dd);
- error_msg("Dump directory '%s' can't be accessed by user with uid %ld", dump_dir_name, caller_uid);
+ error_msg("Dump directory '%s' can't be accessed by user with uid %ld",
+ dump_dir_name, caller_uid);
r = MW_PERM_ERROR;
goto ret;
}
@@ -778,63 +779,6 @@ int DeleteDebugDump(const char *dump_dir_name, long caller_uid)
return 0; /* success */
}
-void GetPluginsInfo(map_map_string_t &map_of_plugin_info)
-{
- DIR *dir = opendir(PLUGINS_CONF_DIR);
- if (!dir)
- return;
-
- struct dirent *dent;
- while ((dent = readdir(dir)) != NULL)
- {
- char *ext = strrchr(dent->d_name, '.');
- if (!ext || strcmp(ext + 1, "conf") != 0)
- continue;
- if (!is_regular_file(dent, PLUGINS_CONF_DIR))
- continue;
- VERB3 log("Found %s", dent->d_name);
- *ext = '\0';
-
- char *glade_file = xasprintf(PLUGINS_LIB_DIR"/%s.glade", dent->d_name);
- if (access(glade_file, F_OK) == 0)
- {
- *ext = '.';
- char *conf_file = concat_path_file(PLUGINS_CONF_DIR, dent->d_name);
- *ext = '\0';
- FILE *fp = fopen(conf_file, "r");
- free(conf_file);
-
- char *descr = NULL;
- if (fp)
- {
- descr = xmalloc_fgetline(fp);
- fclose(fp);
- if (descr && strncmp("# Description:", descr, strlen("# Description:")) == 0)
- overlapping_strcpy(descr, skip_whitespace(descr + strlen("# Description:")));
- else
- {
- free(descr);
- descr = NULL;
- }
- }
- map_string_t plugin_info;
- plugin_info["Name"] = dent->d_name;
- plugin_info["Enabled"] = "yes";
- plugin_info["Type"] = "Reporter"; //was: plugin_type_str[module->GetType()]; field to be removed
- plugin_info["Version"] = VERSION; //was: module->GetVersion(); field to be removed?
- plugin_info["Description"] = descr ? descr : ""; //was: module->GetDescription();
- plugin_info["Email"] = ""; //was: module->GetEmail(); field to be removed
- plugin_info["WWW"] = ""; //was: module->GetWWW(); field to be removed
- plugin_info["GTKBuilder"] = glade_file; //was: module->GetGTKBuilder();
- free(descr);
- map_of_plugin_info[dent->d_name] = plugin_info;
- }
- free(glade_file);
-
- }
- closedir(dir);
-}
-
map_string_h *GetPluginSettings(const char *plugin_name)
{
char *conf_file = xasprintf(PLUGINS_CONF_DIR"/%s.conf", plugin_name);