From 927bc2d0f988d32505b35ed8c793211a17c36c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 1 Dec 2014 13:32:30 +0000 Subject: Facebook: Fix few potential crashes git-svn-id: http://svn.miranda-ng.org/main/trunk@11196 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/communication.cpp | 4 ++-- protocols/FacebookRM/src/definitions.h | 2 -- protocols/FacebookRM/src/process.cpp | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'protocols/FacebookRM/src') diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index c2eec7c6ee..b654b3a261 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -1128,7 +1128,7 @@ bool facebook_client::reconnect() //parent->debugLogA(" Got self retry_interval: %s", retry_interval.c_str()); //std::string visibility = utils::text::source_get_value2(&resp.data, "\"visibility\":", ",}"); - //parent->debugLogA(" Got self visibility: %s", visibility); + //parent->debugLogA(" Got self visibility: %s", visibility.c_str()); return handle_success("reconnect"); } @@ -1384,7 +1384,7 @@ int facebook_client::send_message(MCONTACT hContact, const std::string &message_ } default: // Other error - parent->debugLogA(" !!! Send message error #%d: %s", resp.error_number, resp.error_text); + parent->debugLogA(" !!! Send message error #%d: %s", resp.error_number, resp.error_text.c_str()); return SEND_MESSAGE_ERROR; } diff --git a/protocols/FacebookRM/src/definitions.h b/protocols/FacebookRM/src/definitions.h index 21df8e0d55..81a0294327 100644 --- a/protocols/FacebookRM/src/definitions.h +++ b/protocols/FacebookRM/src/definitions.h @@ -31,8 +31,6 @@ along with this program. If not, see . #define FLAG_CONTAINS(x,y) ((x & y) == y) #define REMOVE_FLAG(x,y) (x = (x & ~y)) -#define LOG debugLogA - #define LOG_NOTIFY 0 #define LOG_WARNING 1 #define LOG_ALERT 2 diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 1e4f394e2d..406e8dfaf5 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -777,7 +777,7 @@ void FacebookProto::ReceiveMessages(std::vector messages, boo if (!hContact) { // hopefully shouldn't happen, but who knows? - debugLogA("! ! ! No hContact for %s", messages[i]->user_id); + debugLogA("! ! ! No hContact for %s", messages[i]->user_id.c_str()); delete messages[i]; continue; } -- cgit v1.2.3