diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-02-07 16:03:50 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-02-07 16:03:50 +0100 |
commit | 34fc227339ccd23b30973ea4684fcb6fb408635e (patch) | |
tree | c47ba01ecdc6e0e2ab5fc38c5eb07c4d6deeeedd /src/Daemon/MiddleWare.cpp | |
parent | 985908c6b086b83381eccd95a0a6508c8bf1d731 (diff) | |
parent | 1e76e071620e1f9bf110dacf3cf8caffccef324b (diff) | |
download | abrt-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.cpp | 22 |
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); } |