diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-01-25 22:58:59 +0100 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2011-01-25 22:58:59 +0100 |
| commit | 906e55b868745f74ea6f009c9ec3bbfb5e135036 (patch) | |
| tree | 9774d243be25bf499b55b6c1dff4c714cec4daf5 /src/plugins | |
| parent | b27a8ff7442559409fe005ef721bc855b5512e3c (diff) | |
| parent | 7f5cbf38caa3c6fdd0afe3a4cb7a9bd3b3010596 (diff) | |
| download | abrt-906e55b868745f74ea6f009c9ec3bbfb5e135036.tar.gz abrt-906e55b868745f74ea6f009c9ec3bbfb5e135036.tar.xz abrt-906e55b868745f74ea6f009c9ec3bbfb5e135036.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/abrt-action-bugzilla.cpp | 8 | ||||
| -rw-r--r-- | src/plugins/abrt_rh_support.c | 22 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/plugins/abrt-action-bugzilla.cpp b/src/plugins/abrt-action-bugzilla.cpp index 4dfafe90..ed8a7e72 100644 --- a/src/plugins/abrt-action-bugzilla.cpp +++ b/src/plugins/abrt-action-bugzilla.cpp @@ -328,7 +328,7 @@ xmlrpc_value* ctx::call_quicksearch_duphash(const char* component, const char* r { char *product = NULL; char *version = NULL; - parse_release(release, &product, &version); + parse_release_for_bz(release, &product, &version); query = xasprintf("ALL component:\"%s\" whiteboard:\"%s\" product:\"%s\"", component, duphash, product ); @@ -482,7 +482,7 @@ xmlrpc_int32 ctx::new_bug(crash_data_t *crash_data, int depend_on_bugno) char *product = NULL; char *version = NULL; - parse_release(release, &product, &version); + parse_release_for_bz(release, &product, &version); xmlrpc_value* result = NULL; char *summary = strbuf_free_nobuf(buf_summary); @@ -684,7 +684,8 @@ static void report_to_bugzilla( char *product = NULL; char *version = NULL; - parse_release(release, &product, &version); + parse_release_for_bz(release, &product, &version); + free(version); xmlrpc_value *result; if (strcmp(product, "Fedora") == 0) @@ -761,7 +762,6 @@ static void report_to_bugzilla( } } free(product); - free(version); if (all_bugs_size < 0) { diff --git a/src/plugins/abrt_rh_support.c b/src/plugins/abrt_rh_support.c index 04e2c8ef..fb1106de 100644 --- a/src/plugins/abrt_rh_support.c +++ b/src/plugins/abrt_rh_support.c @@ -211,6 +211,7 @@ reportfile_free(reportfile_t* file) } +#if 0 //unused // // post_signature() // @@ -272,6 +273,7 @@ post_signature(const char* baseURL, bool ssl_verify, const char* signature) free_abrt_post_state(state); return retval; } +#endif // @@ -391,6 +393,15 @@ send_report_to_new_case(const char* baseURL, char *case_location = find_header_in_abrt_post_state(case_state, "Location:"); switch (case_state->http_resp_code) { + case 404: + /* Not strictly necessary (default branch would deal with it too), + * but makes this typical error less cryptic: + * instead of returning html-encoded body, we show short concise message, + * and show offending URL (typos in which is a typical cause) */ + retval = xasprintf("error in case creation, " + "HTTP code: 404 (Not found), URL:'%s'", case_url); + break; + case 301: /* "301 Moved Permanently" (for example, used to move http:// to https://) */ case 302: /* "302 Found" (just in case) */ case 305: /* "305 Use Proxy" */ @@ -401,18 +412,9 @@ send_report_to_new_case(const char* baseURL, free_abrt_post_state(case_state); goto redirect_case; } - goto bad_resp_code; - - case 404: - /* Not strictly necessary, but makes this typical error less cryptic: - * instead of returning html-encoded body, we show short concise message, - * and show offending URL (typos in which is a typical cause) */ - retval = xasprintf("error in case creation, " - "HTTP code: 404 (Not found), URL:'%s'", case_url); - break; + /* fall through */ default: - bad_resp_code: errmsg = case_state->curl_error_msg; if (errmsg) retval = xasprintf("error in case creation: %s", errmsg); |
