summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/Bugzilla.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-21 21:05:15 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-21 21:05:15 +0100
commit4b54f9866f0dbdc859e300b0169b6ef504ee6c12 (patch)
tree512f6d4e11bf31b43750e4ee7cc80763db42ea33 /lib/Plugins/Bugzilla.cpp
parent335987655eafabe99d0f4b2fecc0f84e31636b77 (diff)
downloadabrt-4b54f9866f0dbdc859e300b0169b6ef504ee6c12.tar.gz
abrt-4b54f9866f0dbdc859e300b0169b6ef504ee6c12.tar.xz
abrt-4b54f9866f0dbdc859e300b0169b6ef504ee6c12.zip
Bugzilla: attach backtrace even if it is small
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins/Bugzilla.cpp')
-rw-r--r--lib/Plugins/Bugzilla.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index 055e65f2..0197a7bf 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -382,18 +382,19 @@ void ctx::add_attachments(const char* bug_id_str, const map_crash_data_t& pCrash
map_crash_data_t::const_iterator it = pCrashData.begin();
for (; it != pCrashData.end(); it++)
{
- const std::string &filename = it->first;
+ const std::string &itemname = it->first;
const std::string &type = it->second[CD_TYPE];
const std::string &content = it->second[CD_CONTENT];
- if (type == CD_TXT && content.length() > CD_TEXT_ATT_SIZE)
- {
+ if (type == CD_TXT
+ && (content.length() > CD_TEXT_ATT_SIZE || itemname == FILENAME_BACKTRACE)
+ ) {
char *encoded64 = encode_base64(content.c_str(), content.length());
// fails only when you write query. when it's done it never fails.
xmlrpc_value* param = xmlrpc_build_value(&env, "(s{s:s,s:s,s:s,s:s})",
bug_id_str,
- "description", ("File: " + filename).c_str(),
- "filename", filename.c_str(),
+ "description", ("File: " + itemname).c_str(),
+ "filename", itemname.c_str(),
"contenttype", "text/plain",
"data", encoded64
);