summaryrefslogtreecommitdiffstats
path: root/src/Daemon/MiddleWare.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-02-07 16:03:50 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2010-02-07 16:03:50 +0100
commit34fc227339ccd23b30973ea4684fcb6fb408635e (patch)
treec47ba01ecdc6e0e2ab5fc38c5eb07c4d6deeeedd /src/Daemon/MiddleWare.cpp
parent985908c6b086b83381eccd95a0a6508c8bf1d731 (diff)
parent1e76e071620e1f9bf110dacf3cf8caffccef324b (diff)
downloadabrt-34fc227339ccd23b30973ea4684fcb6fb408635e.tar.gz
abrt-34fc227339ccd23b30973ea4684fcb6fb408635e.tar.xz
abrt-34fc227339ccd23b30973ea4684fcb6fb408635e.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/Daemon/MiddleWare.cpp')
-rw-r--r--src/Daemon/MiddleWare.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index c3f9061a..ebd5c0fc 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -702,10 +702,6 @@ static mw_result_t SavePackageDescriptionToDebugDump(
catch (CABRTException& e)
{
error_msg("%s", e.what());
- if (e.type() == EXCEP_DD_SAVE)
- {
- return MW_FILE_ERROR;
- }
return MW_ERROR;
}
@@ -832,15 +828,16 @@ static mw_result_t SaveDebugDumpToDatabase(const char *pUUID,
mw_result_t res = FillCrashInfo(pUUID, pUID, pCrashData);
if (res == MW_OK)
{
+ const char *first = get_crash_data_item_content(pCrashData, CD_DUMPDIR).c_str();
if (row.m_sReported == "1")
{
- log("Crash is already reported");
+ log("Crash is in database already (dup of %s) and is reported", first);
return MW_REPORTED;
}
if (row.m_sCount != "1")
{
- log("Crash is in database already");
- return MW_OCCURED;
+ log("Crash is in database already (dup of %s)", first);
+ return MW_OCCURRED;
}
}
return res;
@@ -876,10 +873,6 @@ mw_result_t SaveDebugDump(const char *pDebugDumpDir,
catch (CABRTException& e)
{
error_msg("%s", e.what());
- if (e.type() == EXCEP_DD_SAVE)
- {
- return MW_FILE_ERROR;
- }
return MW_ERROR;
}
@@ -898,6 +891,13 @@ mw_result_t SaveDebugDump(const char *pDebugDumpDir,
const char *uid_str = analyzer_has_InformAllUsers(analyzer.c_str())
? "-1"
: UID.c_str();
+ /* Loads pCrashData (from the *first debugdump dir* if this one is a dup)
+ * Returns:
+ * MW_REPORTED: "the crash is flagged as reported in DB" (which also means it's a dup)
+ * MW_OCCURRED: "crash count is != 1" (iow: it is > 1 - dup)
+ * MW_OK: "crash count is 1" (iow: this is a new crash, not a dup)
+ * else: an error code
+ */
return SaveDebugDumpToDatabase(lUUID.c_str(), uid_str, time.c_str(), pDebugDumpDir, pCrashData);
}