From b348085ac9f3d4a7ded81026bffa962a065bdf97 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 19 Jan 2010 13:55:23 +0100 Subject: Eliminate ATT file type - use TXT or BIN Signed-off-by: Denys Vlasenko --- src/Daemon/CommLayerServerDBus.cpp | 9 +++------ src/Daemon/MiddleWare.cpp | 4 +++- src/Gui/CCReporterDialog.py | 3 +-- src/Gui/CC_gui_functions.py | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp index db0d2f5..182aa6c 100644 --- a/src/Daemon/CommLayerServerDBus.cpp +++ b/src/Daemon/CommLayerServerDBus.cpp @@ -205,10 +205,8 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply) int r; DBusMessageIter in_iter; dbus_message_iter_init(call, &in_iter); - map_crash_report_t argin1; - const char* comment; - const char* reproduce; + map_crash_report_t argin1; r = load_val(&in_iter, argin1); if (r == ABRT_DBUS_ERROR) { @@ -218,9 +216,8 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply) map_crash_report_t::const_iterator it_comment = argin1.find(CD_COMMENT); map_crash_report_t::const_iterator it_reproduce = argin1.find(CD_REPRODUCE); - comment = (it_comment != argin1.end()) ? it_comment->second[CD_CONTENT].c_str() : ""; - reproduce = (it_reproduce != argin1.end()) ? it_reproduce->second[CD_CONTENT].c_str() : ""; - + const char* comment = (it_comment != argin1.end()) ? it_comment->second[CD_CONTENT].c_str() : ""; + const char* reproduce = (it_reproduce != argin1.end()) ? it_reproduce->second[CD_CONTENT].c_str() : ""; const char* errmsg = NULL; if (strlen(comment) > LIMIT_MESSAGE) { diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 70527eb..c2a122a 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -187,7 +187,7 @@ static void DebugDumpToCrashReport(const char *pDebugDumpDir, map_crash_report_t add_crash_data_to_crash_report( pCrashReport, short_name, - (content.length() < CD_ATT_SIZE ? CD_TXT : CD_ATT), + CD_TXT, CD_ISEDITABLE, content ); @@ -433,6 +433,8 @@ report_status_t Report(const map_crash_report_t& pCrashReport, { report_status_t ret; + /* dbus handler passes pCrashReport from user without checking it */ + if (!CheckReport(pCrashReport)) { throw CABRTException(EXCEP_ERROR, "Report(): Some of mandatory report data are missing."); diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index 9bc5ff5..ea4b046 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -21,7 +21,6 @@ CD_CONTENT = 2 CD_SYS = "s" CD_BIN = "b" CD_TXT = "t" -CD_ATT = "a" # response REFRESH = -50 @@ -256,7 +255,7 @@ class ReporterDialog(): self.editable.append(item) self.row_dict[item] = self.reportListStore.append([item, self.report[item][CD_CONTENT], item in self.editable, True, - self.report[item][CD_TYPE] in [CD_ATT,CD_BIN]]) + self.report[item][CD_TYPE] == CD_BIN]) def dehydrate(self): attributes = ["item", "content", "editable", "send", "attachment"] diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py index 0379f20..a9c47fa 100644 --- a/src/Gui/CC_gui_functions.py +++ b/src/Gui/CC_gui_functions.py @@ -234,5 +234,5 @@ def show_log(log, parent=None): if __name__ == "__main__": window = gtk.Window() - gui_report_dialog("Bugzilla: CReporterBugzilla::Report(): CReporterBugzilla::Login(): RPC response indicates failure. The username or password you entered is not valid.\nLogger: Report was stored into: /var/log/abrt-logger", window) + gui_report_dialog("Bugzilla: CReporterBugzilla::Report(): CReporterBugzilla::Login(): RPC response indicates failure. The username or password you entered is not valid.\nLogger: Report was stored into: /var/log/abrt.log", window) gtk.main() -- cgit