summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/CCpp.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-09 12:57:59 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-09 12:57:59 +0200
commitb0d2f3c7f257be07bbf8af8e963335127ef43d65 (patch)
treeae488263112c9a81cda06066a447c7bf03180dc1 /lib/Plugins/CCpp.cpp
parent6cc5b01813ba87e4a68ed848f91a6a3d573af0f6 (diff)
downloadabrt-b0d2f3c7f257be07bbf8af8e963335127ef43d65.tar.gz
abrt-b0d2f3c7f257be07bbf8af8e963335127ef43d65.tar.xz
abrt-b0d2f3c7f257be07bbf8af8e963335127ef43d65.zip
*: add "force" param to CreateReport dbus call. If !0, regenerates backtrace
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins/CCpp.cpp')
-rw-r--r--lib/Plugins/CCpp.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index c054c78..a2665ed 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -578,7 +578,7 @@ static bool DebuginfoCheckPolkit(int uid)
}
-void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir)
+void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir, int force)
{
update_client(_("Starting report creation..."));
@@ -588,18 +588,19 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir)
CDebugDump dd;
dd.Open(pDebugDumpDir);
- bool bt_exists = dd.Exist(FILENAME_BACKTRACE);
- if (bt_exists)
+ if (!force)
{
- dd.Close(); /* do not keep dir locked longer than needed */
- return; /* already done */
+ bool bt_exists = dd.Exist(FILENAME_BACKTRACE);
+ if (bt_exists)
+ {
+ return; /* backtrace already exists */
+ }
}
dd.LoadText(FILENAME_PACKAGE, package);
dd.LoadText(FILENAME_UID, UID);
- dd.Close();
-
+ dd.Close(); /* do not keep dir locked longer than needed */
map_plugin_settings_t settings = GetSettings();
if (settings["InstallDebuginfo"] == "yes" &&
@@ -609,7 +610,7 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir)
}
else
{
- warn_client(_("Skipping debuginfo installation"));
+ VERB1 log(_("Skipping debuginfo installation"));
}
GetBacktrace(pDebugDumpDir, backtrace);