diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-21 13:58:19 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-21 13:58:19 +0300 |
commit | d78ec3edaa1f6c3d6cb80aa2767a38afda76bc25 (patch) | |
tree | 6d14b93ced1614285dc1ad0a975a7a93f11afbd3 /protocols/FacebookRM/src/communication.cpp | |
parent | aadbf89f4e9d5939e9b3d9a6e75642c6208b9992 (diff) |
Facebook: warning fixes
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
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 <http://www.gnu.org/licenses/>. #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<facebook_message> messages; - parent->ParseMessages(resp.data, messages); - + std::vector<facebook_message> 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 |