From fb72ac689ca4832fca215edc942ae01592ecfff8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 7 Dec 2009 11:46:13 +0100 Subject: *: remove most of remaining const string& params Signed-off-by: Denys Vlasenko --- src/Daemon/MiddleWare.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Daemon/MiddleWare.cpp') diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 8528f64..e775764 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -348,7 +348,7 @@ void RunActionsAndReporters(const char *pDebugDumpDir) map_crash_report_t crashReport; DebugDumpToCrashReport(pDebugDumpDir, crashReport); VERB2 log("%s.Report(...)", it_ar->first.c_str()); - reporter->Report(crashReport, plugin_settings, it_ar->second); + reporter->Report(crashReport, plugin_settings, it_ar->second.c_str()); } else if (tp == ACTION) { @@ -490,7 +490,7 @@ report_status_t Report(const map_crash_report_t& pCrashReport, } #endif map_plugin_settings_t plugin_settings = pSettings[pluginName]; - std::string res = reporter->Report(pCrashReport, plugin_settings, it_r->second); + std::string res = reporter->Report(pCrashReport, plugin_settings, it_r->second.c_str()); #if 0 /* Using ~user/.abrt/ is bad wrt security */ if (home != "") @@ -688,7 +688,7 @@ void autoreport(const pair_string_string_t& reporter_options, const map_crash_re } map_plugin_settings_t plugin_settings; - std::string res = reporter->Report(crash_report, plugin_settings, reporter_options.second); + std::string res = reporter->Report(crash_report, plugin_settings, reporter_options.second.c_str()); } /** -- cgit From 7ee6b78b9f901e84be31117940ab7ab8af631e9d Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 10 Dec 2009 18:26:37 +0100 Subject: remove one case when we write data needlessly; remove 2 unused funcs Signed-off-by: Denys Vlasenko --- src/Daemon/MiddleWare.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Daemon/MiddleWare.cpp') diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index e775764..e483f3f 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -427,12 +427,12 @@ report_status_t Report(const map_crash_report_t& pCrashReport, std::string packageNVR = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT]; std::string packageName = packageNVR.substr(0, packageNVR.rfind("-", packageNVR.rfind("-") - 1)); - // Save comments and how to reproduciton + // Save comment and "how to reproduce" map_crash_report_t::const_iterator it_comment = pCrashReport.find(CD_COMMENT); map_crash_report_t::const_iterator it_reproduce = pCrashReport.find(CD_REPRODUCE); - std::string pDumpDir = getDebugDumpDir(UUID.c_str(), UID.c_str()); - + if (it_comment != pCrashReport.end() || it_reproduce != pCrashReport.end()) { + std::string pDumpDir = getDebugDumpDir(UUID.c_str(), UID.c_str()); CDebugDump dd; dd.Open(pDumpDir.c_str()); if (it_comment != pCrashReport.end()) -- cgit From 890f62322fc8fee262e39a10428b1a2489edf267 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 11 Dec 2009 16:43:57 +0100 Subject: abrt-cli: report success/failure of reporting. closes bug 71 See https://fedorahosted.org/abrt/ticket/71 Signed-off-by: Denys Vlasenko --- src/Daemon/MiddleWare.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Daemon/MiddleWare.cpp') diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index e483f3f..c0ffaba 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -498,15 +498,15 @@ report_status_t Report(const map_crash_report_t& pCrashReport, reporter->SetSettings(oldSettings); } #endif - ret[pluginName].push_back("1"); - ret[pluginName].push_back(res); + ret[pluginName].push_back("1"); // REPORT_STATUS_IDX_FLAG + ret[pluginName].push_back(res); // REPORT_STATUS_IDX_MSG message += res + "\n"; } } catch (CABRTException& e) { - ret[pluginName].push_back("0"); - ret[pluginName].push_back(e.what()); + ret[pluginName].push_back("0"); // REPORT_STATUS_IDX_FLAG + ret[pluginName].push_back(e.what()); // REPORT_STATUS_IDX_MSG update_client("Reporting via '%s' was not successful: %s", pluginName.c_str(), e.what()); } } -- cgit From 348b393bdad0aaa5a849b30c6c2e205ddfbd30bc Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 11 Dec 2009 20:27:12 +0100 Subject: temporarily convert hyperlink-laden label to normal one (HL doesn't work) Signed-off-by: Denys Vlasenko --- src/Daemon/MiddleWare.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Daemon/MiddleWare.cpp') diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index c0ffaba..5235c17 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -604,6 +604,8 @@ static mw_result_t SavePackageDescriptionToDebugDump(const char *pExecutable, } std::string description = GetDescription(packageName.c_str()); +//TODO: if executable in /usr/bin/python, /bin/sh and such, +//we need to extract component using argv[1] std::string component = GetComponent(pExecutable); try -- cgit