From d78ec3edaa1f6c3d6cb80aa2767a38afda76bc25 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 21 Dec 2018 13:58:19 +0300 Subject: Facebook: warning fixes --- protocols/FacebookRM/src/communication.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'protocols/FacebookRM/src/communication.cpp') diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index e7ca35788c..f9d5b1f5af 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -22,12 +22,12 @@ along with this program. If not, see . #include "stdafx.h" -void facebook_client::client_notify(wchar_t* message) +void facebook_client::client_notify(const wchar_t *message) { parent->NotifyEvent(parent->m_tszUserName, message, 0, EVENT_CLIENT); } -void facebook_client::info_notify(wchar_t* message) +void facebook_client::info_notify(const wchar_t *message) { parent->NotifyEvent(parent->m_tszUserName, message, 0, EVENT_OTHER); } @@ -878,13 +878,10 @@ bool facebook_client::channel() } else if (!type.empty()) { // for "msg", "fullReload" and maybe also other types // Something has been received, throw to new thread to process + parent->debugLogA("*** Starting processing messages"); { - parent->debugLogA("*** Starting processing messages"); - - try { - std::vector messages; - parent->ParseMessages(resp.data, messages); - + std::vector messages; + if (parent->ParseMessages(resp.data, messages) == EXIT_SUCCESS) { parent->ReceiveMessages(messages); if (parent->getBool(FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE, DEFAULT_EVENT_NOTIFICATIONS_ENABLE)) @@ -892,9 +889,7 @@ bool facebook_client::channel() parent->debugLogA("*** Messages processed"); } - catch (const std::exception &e) { - parent->debugLogA("*** Error processing messages: %s", e.what()); - } + else parent->debugLogA("*** Error processing messages"); } // Get new sequence number -- cgit v1.2.3