diff options
| author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-02-08 18:06:51 +0100 |
|---|---|---|
| committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-02-08 18:24:31 +0100 |
| commit | 1bf37ad93e87f065347fdb7224578d55cca8d384 (patch) | |
| tree | 1ee45908c6f98cc8b2eda792d325e1f294992a7c /lib/Utils | |
| parent | ed333008ad25e2ca4d590cf2052337ef6cf1af71 (diff) | |
| download | abrt-1bf37ad93e87f065347fdb7224578d55cca8d384.tar.gz abrt-1bf37ad93e87f065347fdb7224578d55cca8d384.tar.xz abrt-1bf37ad93e87f065347fdb7224578d55cca8d384.zip | |
new bugzilla insides, add comment and reproduce when it's filled and not CLOSED, hopping when bug is CLOSED as DUPLICATE
Diffstat (limited to 'lib/Utils')
| -rw-r--r-- | lib/Utils/Plugin.h | 1 | ||||
| -rw-r--r-- | lib/Utils/abrt_xmlrpc.cpp | 3 | ||||
| -rw-r--r-- | lib/Utils/make_descr.cpp | 32 |
3 files changed, 35 insertions, 1 deletions
diff --git a/lib/Utils/Plugin.h b/lib/Utils/Plugin.h index c699eb3..1eefac6 100644 --- a/lib/Utils/Plugin.h +++ b/lib/Utils/Plugin.h @@ -120,6 +120,7 @@ typedef struct SPluginInfo /* helper finctions */ std::string make_description_bz(const map_crash_data_t& pCrashData); +std::string make_description_reproduce_comment(const map_crash_data_t& pCrashData); std::string make_description_logger(const map_crash_data_t& pCrashData); std::string make_description_catcut(const map_crash_data_t& pCrashData); diff --git a/lib/Utils/abrt_xmlrpc.cpp b/lib/Utils/abrt_xmlrpc.cpp index 3737ee1..8be74d8 100644 --- a/lib/Utils/abrt_xmlrpc.cpp +++ b/lib/Utils/abrt_xmlrpc.cpp @@ -35,12 +35,13 @@ CURL* xcurl_easy_init() void throw_xml_fault(xmlrpc_env *env) { - std::string errmsg = ssprintf("XML-RPC Fault: %s(%d)", env->fault_string, env->fault_code); + std::string errmsg = ssprintf("XML-RPC Fault(%d): %s", env->fault_code, env->fault_string); xmlrpc_env_clean(env); // this is needed ONLY if fault_occurred xmlrpc_env_init(env); // just in case user catches ex and _continues_ to use env error_msg("%s", errmsg.c_str()); // show error in daemon log throw CABRTException(EXCEP_PLUGIN, errmsg.c_str()); } + void throw_if_xml_fault_occurred(xmlrpc_env *env) { if (env->fault_occurred) diff --git a/lib/Utils/make_descr.cpp b/lib/Utils/make_descr.cpp index c2821a5..e6ea2de 100644 --- a/lib/Utils/make_descr.cpp +++ b/lib/Utils/make_descr.cpp @@ -193,6 +193,38 @@ string make_description_logger(const map_crash_data_t& pCrashData) return description; } +string make_description_reproduce_comment(const map_crash_data_t& pCrashData) +{ + map_crash_data_t::const_iterator end = pCrashData.end(); + map_crash_data_t::const_iterator it; + + string howToReproduce; + it = pCrashData.find(FILENAME_REPRODUCE); + if (it != end) + { + VERB3 log("make_description_reproduce_comment %s", it->second[CD_CONTENT].c_str()); + if ((it->second[CD_CONTENT].size() > 0) + && (it->second[CD_CONTENT] != "1.\n2.\n3.\n")) + { + howToReproduce = "\n\nHow to reproduce\n" + "-----\n"; + howToReproduce += it->second[CD_CONTENT]; + } + } + string comment; + it = pCrashData.find(FILENAME_COMMENT); + if (it != end) + { + if (it->second[CD_CONTENT].size() > 0) + { + comment = "\n\nComment\n" + "-----\n"; + comment += it->second[CD_CONTENT]; + } + } + return howToReproduce + comment; +} + /* This needs more work to make the result less ugly */ string make_description_catcut(const map_crash_data_t& pCrashData) { |
