commit 42ab4016ea8901108a22233a1b4a44a995e9a194
Author: Nikola Pajkovsky <npajkovs@redhat.com>
Date: Mon Mar 28 14:01:53 2011 +0200
Ticket #160 Hash is not present in Bugzilla
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
diff --git a/src/plugins/abrt-action-bugzilla.cpp b/src/plugins/abrt-action-bugzilla.cpp
index abc3fa1..e5e5bc8 100644
--- a/src/plugins/abrt-action-bugzilla.cpp
+++ b/src/plugins/abrt-action-bugzilla.cpp
@@ -299,7 +299,8 @@ void ctx::get_bug_cc(xmlrpc_value* result_xml, struct bug_info* bz)
return;
}
-xmlrpc_value* ctx::call_quicksearch_duphash(const char* component, const char* release, const char* duphash)
+xmlrpc_value* ctx::call_quicksearch_duphash(const char* component,
+ const char* release, const char* duphash)
{
char *query = NULL;
if (!release)
@@ -657,6 +658,14 @@ static void report_to_bugzilla(
const char *component = get_crash_item_content_or_NULL(crash_data, FILENAME_COMPONENT);
const char *duphash = get_crash_item_content_or_NULL(crash_data, FILENAME_DUPHASH);
+ if (!duphash)
+ error_msg_and_die(_("Essential file '%s' is missing, can't continue.."),
+ FILENAME_DUPHASH);
+
+ if (!*duphash)
+ error_msg_and_die(_("Essential file '%s' is empty, can't continue.."),
+ FILENAME_DUPHASH);
+
const char *release = get_crash_item_content_or_NULL(crash_data, FILENAME_OS_RELEASE);
if (!release) /* Old dump dir format compat. Remove in abrt-2.1 */
release = get_crash_item_content_or_NULL(crash_data, "release");