summaryrefslogtreecommitdiffstats
path: root/src/plugins/abrt-action-bugzilla.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-12-08 15:03:24 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-12-08 15:03:24 +0100
commitdef39238640489b41da5cdc8fd4a83d16d49fcc7 (patch)
tree7700bf86d63e474ebf613c90b09d078aab333e88 /src/plugins/abrt-action-bugzilla.cpp
parent816f3e001271ed8ab7fdadb6d90aeb2c61362dac (diff)
downloadabrt-def39238640489b41da5cdc8fd4a83d16d49fcc7.tar.gz
abrt-def39238640489b41da5cdc8fd4a83d16d49fcc7.tar.xz
abrt-def39238640489b41da5cdc8fd4a83d16d49fcc7.zip
removal of C++isms from libabrt, part 2
This patch rewrites a few places where we use C++ strings Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/plugins/abrt-action-bugzilla.cpp')
-rw-r--r--src/plugins/abrt-action-bugzilla.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/abrt-action-bugzilla.cpp b/src/plugins/abrt-action-bugzilla.cpp
index 8486662d..d1bd271a 100644
--- a/src/plugins/abrt-action-bugzilla.cpp
+++ b/src/plugins/abrt-action-bugzilla.cpp
@@ -567,7 +567,9 @@ int ctx::add_attachments(const char* bug_id_str, crash_data_t *crash_data)
int ctx::get_bug_info(struct bug_info* bz, xmlrpc_int32 bug_id)
{
- xmlrpc_value* result = call("bugzilla.getBug", "(s)", to_string(bug_id).c_str());
+ char bug_id_str[sizeof(long)*3 + 2];
+ sprintf(bug_id_str, "%lu", (long)bug_id);
+ xmlrpc_value* result = call("bugzilla.getBug", "(s)", bug_id_str);
if (!result)
return -1;
@@ -772,8 +774,10 @@ static void report_to_bugzilla(
error_msg_and_die(_("Bugzilla entry creation failed"));
}
- log("Adding attachments to bug %d...", bug_id);
- int ret = bz_server.add_attachments(to_string(bug_id).c_str(), crash_data);
+ log("Adding attachments to bug %ld...", (long)bug_id);
+ char bug_id_str[sizeof(long)*3 + 2];
+ sprintf(bug_id_str, "%ld", (long) bug_id);
+ int ret = bz_server.add_attachments(bug_id_str, crash_data);
if (ret == -1)
{
throw_if_xml_fault_occurred(&bz_server.env);