diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/abrt-action-bugzilla.c | 17 | ||||
-rw-r--r-- | src/plugins/abrt-action-kerneloops.c | 11 | ||||
-rw-r--r-- | src/plugins/abrt-action-mailx.c | 11 | ||||
-rw-r--r-- | src/plugins/abrt-action-print.c | 11 | ||||
-rw-r--r-- | src/plugins/abrt-action-rhtsupport.c | 11 | ||||
-rw-r--r-- | src/plugins/analyze_LocalGDB.xml.in | 2 | ||||
-rw-r--r-- | src/plugins/analyze_RetraceServer.xml.in | 2 | ||||
-rw-r--r-- | src/plugins/analyze_xsession_errors.xml.in | 2 | ||||
-rw-r--r-- | src/plugins/report_Bugzilla.xml.in | 7 |
9 files changed, 33 insertions, 41 deletions
diff --git a/src/plugins/abrt-action-bugzilla.c b/src/plugins/abrt-action-bugzilla.c index 9290112a..956e11e5 100644 --- a/src/plugins/abrt-action-bugzilla.c +++ b/src/plugins/abrt-action-bugzilla.c @@ -22,15 +22,13 @@ #include "abrt_xmlrpc.h" #include "rhbz.h" -#define XML_RPC_SUFFIX "/xmlrpc.cgi" +#define XML_RPC_SUFFIX "/xmlrpc.cgi" static void report_to_bugzilla(const char *dump_dir_name, map_string_h *settings) { - struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); - if (!dd) - xfunc_die(); /* dd_opendir already emitted error msg */ - problem_data_t *problem_data = create_problem_data_from_dump_dir(dd); - dd_close(dd); + problem_data_t *problem_data = create_problem_data_for_reporting(dump_dir_name); + if (!problem_data) + xfunc_die(); /* create_problem_data_for_reporting already emitted error msg */ const char *env; const char *login; @@ -100,7 +98,7 @@ static void report_to_bugzilla(const char *dump_dir_name, map_string_h *settings VERB3 log("Bugzilla has %i reports with same duphash '%s'", all_bugs_size, duphash); - int bug_id = -1, dependent_bug = -1; + int bug_id = -1; struct bug_info *bz = NULL; if (all_bugs_size > 0) { @@ -110,7 +108,6 @@ static void report_to_bugzilla(const char *dump_dir_name, map_string_h *settings if (strcmp(bz->bi_product, product) != 0) { - dependent_bug = bug_id; /* found something, but its a different product */ free_bug_info(bz); @@ -209,7 +206,7 @@ static void report_to_bugzilla(const char *dump_dir_name, map_string_h *settings bugzilla_url, bz->bi_id); - dd = dd_opendir(dump_dir_name, /*flags:*/ 0); + struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); if (dd) { char *msg = xasprintf("Bugzilla: URL=%s/show_bug.cgi?id=%u", bugzilla_url, bz->bi_id); @@ -233,7 +230,7 @@ int main(int argc, char **argv) /* Can't keep these strings/structs static: _() doesn't support that */ const char *program_usage_string = _( - "\b [-v] -c CONFFILE -d DIR\n" + "\b [-v] [-c CONFFILE] -d DIR\n" "\n" "Reports problem to Bugzilla.\n" "\n" diff --git a/src/plugins/abrt-action-kerneloops.c b/src/plugins/abrt-action-kerneloops.c index 99b2fea9..b8f4337a 100644 --- a/src/plugins/abrt-action-kerneloops.c +++ b/src/plugins/abrt-action-kerneloops.c @@ -84,12 +84,9 @@ static void report_to_kerneloops( const char *dump_dir_name, map_string_h *settings) { - struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); - if (!dd) - exit(1); /* error msg is already logged */ - - problem_data_t *problem_data = create_problem_data_from_dump_dir(dd); - dd_close(dd); + problem_data_t *problem_data = create_problem_data_for_reporting(dump_dir_name); + if (!problem_data) + xfunc_die(); /* create_problem_data_for_reporting already emitted error msg */ const char *backtrace = get_problem_item_content_or_NULL(problem_data, FILENAME_BACKTRACE); if (!backtrace) @@ -113,7 +110,7 @@ static void report_to_kerneloops( * RemoteIP: 34192fd15e34bf60fac6a5f01bba04ddbd3f0558 * - no URL or bug ID apparently... */ - dd = dd_opendir(dump_dir_name, /*flags:*/ 0); + struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); if (dd) { char *msg = xasprintf("kerneloops: URL=%s", submitURL); diff --git a/src/plugins/abrt-action-mailx.c b/src/plugins/abrt-action-mailx.c index 21180854..d513fbb7 100644 --- a/src/plugins/abrt-action-mailx.c +++ b/src/plugins/abrt-action-mailx.c @@ -59,12 +59,9 @@ static void create_and_send_email( const char *dump_dir_name, map_string_h *settings) { - struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); - if (!dd) - exit(1); /* error msg is already logged by dd_opendir */ - - problem_data_t *problem_data = create_problem_data_from_dump_dir(dd); - dd_close(dd); + problem_data_t *problem_data = create_problem_data_for_reporting(dump_dir_name); + if (!problem_data) + xfunc_die(); /* create_problem_data_for_reporting already emitted error msg */ char* env; env = getenv("Mailx_Subject"); @@ -116,7 +113,7 @@ static void create_and_send_email( free_problem_data(problem_data); - dd = dd_opendir(dump_dir_name, /*flags:*/ 0); + struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); if (dd) { char *msg = xasprintf("email: %s", email_to); diff --git a/src/plugins/abrt-action-print.c b/src/plugins/abrt-action-print.c index d433fa52..0de1fbe6 100644 --- a/src/plugins/abrt-action-print.c +++ b/src/plugins/abrt-action-print.c @@ -64,12 +64,9 @@ int main(int argc, char **argv) perror_msg_and_die("Can't open '%s'", output_file); } - struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); - if (!dd) - return 1; /* error message is already logged */ - - problem_data_t *problem_data = create_problem_data_from_dump_dir(dd); - dd_close(dd); + problem_data_t *problem_data = create_problem_data_for_reporting(dump_dir_name); + if (!problem_data) + xfunc_die(); /* create_problem_data_for_reporting already emitted error msg */ char *dsc = make_description_logger(problem_data); fputs(dsc, stdout); @@ -82,7 +79,7 @@ int main(int argc, char **argv) { if (opts & OPT_r) { - dd = dd_opendir(dump_dir_name, /*flags:*/ 0); + struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); if (dd) { char *msg = xasprintf("file: %s", output_file); diff --git a/src/plugins/abrt-action-rhtsupport.c b/src/plugins/abrt-action-rhtsupport.c index 989fd75d..59d02eda 100644 --- a/src/plugins/abrt-action-rhtsupport.c +++ b/src/plugins/abrt-action-rhtsupport.c @@ -28,12 +28,9 @@ static void report_to_rhtsupport( const char *dump_dir_name, map_string_h *settings) { - struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); - if (!dd) - exit(1); /* error msg is already logged by dd_opendir */ - - problem_data_t *problem_data = create_problem_data_from_dump_dir(dd); - dd_close(dd); + problem_data_t *problem_data = create_problem_data_for_reporting(dump_dir_name); + if (!problem_data) + xfunc_die(); /* create_problem_data_for_reporting already emitted error msg */ /* Gzipping e.g. 0.5gig coredump takes a while. Let client know what we are doing */ log(_("Compressing data")); @@ -245,7 +242,7 @@ static void report_to_rhtsupport( } /* No error */ - dd = dd_opendir(dump_dir_name, /*flags:*/ 0); + struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); if (dd) { char *msg = xasprintf("RHTSupport: %s", result); diff --git a/src/plugins/analyze_LocalGDB.xml.in b/src/plugins/analyze_LocalGDB.xml.in index 4f7ccce1..b2975f76 100644 --- a/src/plugins/analyze_LocalGDB.xml.in +++ b/src/plugins/analyze_LocalGDB.xml.in @@ -5,5 +5,5 @@ <_long-description>Needs to downloads debuginfo packages, which might take significant time, and take up disk space. However, unlike RetraceServer, doesn't send coredump to remote machines. </_long-description> - <creates-elements>backtrace</creates-elements> + <creates-items>backtrace</creates-items> </event> diff --git a/src/plugins/analyze_RetraceServer.xml.in b/src/plugins/analyze_RetraceServer.xml.in index d2072db5..139e114d 100644 --- a/src/plugins/analyze_RetraceServer.xml.in +++ b/src/plugins/analyze_RetraceServer.xml.in @@ -6,7 +6,7 @@ Pros: no need for debuginfo downloads. Retrace server's database of debuginfos is more complete. Retrace server may generate better backtraces. Cons: coredump you upload contains all the data from the crashed program, including your private data, if any. </_long-description> - <creates-elements>backtrace</creates-elements> + <creates-items>backtrace</creates-items> <options> <option type="text" name="RETRACE_SERVER_URL"> <_label>Retrace server URL</_label> diff --git a/src/plugins/analyze_xsession_errors.xml.in b/src/plugins/analyze_xsession_errors.xml.in index 9f7a46bf..1e3d738b 100644 --- a/src/plugins/analyze_xsession_errors.xml.in +++ b/src/plugins/analyze_xsession_errors.xml.in @@ -6,5 +6,5 @@ Scans through ~/.xsession-errors file and saves those lines which contain executable's name. The result is saved as 'xsession_errors' element. </_long-description> - <creates-elements>xsession_errors</creates-elements> + <creates-items>xsession_errors</creates-items> </event> diff --git a/src/plugins/report_Bugzilla.xml.in b/src/plugins/report_Bugzilla.xml.in index 8a53f611..d12521d8 100644 --- a/src/plugins/report_Bugzilla.xml.in +++ b/src/plugins/report_Bugzilla.xml.in @@ -2,6 +2,13 @@ <event> <_name>Bugzilla</_name> <_description>Report to Bugzilla bug tracker</_description> + + <requires-items></requires-items> + <exclude-items-by-default></exclude-items-by-default> + <exclude-items-always></exclude-items-always> + <exclude-binary-items>yes</exclude-binary-items> + <include-items-by-default></include-items-by-default> + <options> <option type="text" name="Bugzilla_BugzillaURL"> <_label>Bugzilla URL</_label> |