diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-05-17 15:10:24 +0200 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-05-17 15:13:48 +0200 |
commit | 85690ca08ca5e6d782343a91d08547c56257658e (patch) | |
tree | 1ae97b279cb8b660c8bf74f66eeedc42849d34d0 /lib/Plugins | |
parent | d564bc6ed770602c59c02cb23973fd8eae8ffa97 (diff) | |
download | abrt-85690ca08ca5e6d782343a91d08547c56257658e.tar.gz abrt-85690ca08ca5e6d782343a91d08547c56257658e.tar.xz abrt-85690ca08ca5e6d782343a91d08547c56257658e.zip |
remove std::string from parse_release()
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'lib/Plugins')
-rw-r--r-- | lib/Plugins/Bugzilla.cpp | 19 | ||||
-rw-r--r-- | lib/Plugins/Catcut.cpp | 12 |
2 files changed, 19 insertions, 12 deletions
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index b7c15de2..94fd3838 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -300,8 +300,10 @@ void ctx::get_bug_cc(xmlrpc_value* result_xml, struct bug_info* bz) xmlrpc_value* ctx::call_quicksearch_duphash(const char* component, const char* duphash) { - std::string query = ssprintf("ALL component:\"%s\" statuswhiteboard:\"%s\"", component, duphash); - return call("Bug.search", "({s:s})", "quicksearch", query.c_str()); + char *query = xasprintf("ALL component:\"%s\" statuswhiteboard:\"%s\"", component, duphash); + xmlrpc_value *ret = call("Bug.search", "({s:s})", "quicksearch", query); + free(query); + return ret; } xmlrpc_int32 ctx::get_bug_id(xmlrpc_value* result_xml) @@ -373,19 +375,22 @@ xmlrpc_int32 ctx::new_bug(const map_crash_data_t& pCrashData) std::string description = "abrt version: "VERSION"\n"; description += make_description_bz(pCrashData); - std::string product; - std::string version; - parse_release(release.c_str(), product, version); + char *product = NULL; + char *version = NULL; + parse_release(release.c_str(), &product, &version); xmlrpc_value* result = call("Bug.create", "({s:s,s:s,s:s,s:s,s:s,s:s,s:s})", - "product", product.c_str(), + "product", product, "component", component.c_str(), - "version", version.c_str(), + "version", version, "summary", summary.c_str(), "description", description.c_str(), "status_whiteboard", status_whiteboard.c_str(), "platform", arch.c_str() ); + free(product); + free(version); + if (!result) return -1; diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp index 6c655f2b..05a93bb8 100644 --- a/lib/Plugins/Catcut.cpp +++ b/lib/Plugins/Catcut.cpp @@ -290,20 +290,22 @@ ctx::new_bug(const char *auth_cookie, const map_crash_data_t& pCrashData) string description = make_description_catcut(pCrashData); - string product; - string version; - parse_release(release.c_str(), product, version); + char *product = NULL; + char *version = NULL; + parse_release(release.c_str(), &product, &version); xmlrpc_value *param = xmlrpc_build_value(&env, "(s{s:s,s:s,s:s,s:s,s:s,s:s,s:s})", auth_cookie, - "product", product.c_str(), + "product", product, "component", component.c_str(), - "version", version.c_str(), + "version", version, "summary", summary.c_str(), "description", description.c_str(), "status_whiteboard", status_whiteboard.c_str(), "platform", arch.c_str() ); + free(product); + free(version); throw_if_xml_fault_occurred(&env); xmlrpc_value *result; |