diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-12-01 13:32:30 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-12-01 13:32:30 +0000 |
commit | 927bc2d0f988d32505b35ed8c793211a17c36c94 (patch) | |
tree | 1b712d08dbcb06b80d0efbb8e9bdf3b792a753a8 | |
parent | 517ae1ee54bf233329ac3fc756458e62b6641a4c (diff) |
Facebook: Fix few potential crashes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11196 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/definitions.h | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 2 |
3 files changed, 3 insertions, 5 deletions
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 <http://www.gnu.org/licenses/>. #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<facebook_message*> 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; } |