summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/communication.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-07-20 07:46:19 +0000
committerRobert Pösel <robyer@seznam.cz>2014-07-20 07:46:19 +0000
commit42c1d344fd105bcc25ae35e5a82d16a978b302c4 (patch)
tree818f9107867a2ccc49cb0596aac0707e11a7b014 /protocols/FacebookRM/src/communication.cpp
parent471448968040658dbade77474b06248983a807bc (diff)
Facebook: Don't do any requests when protocol is offline
git-svn-id: http://svn.miranda-ng.org/main/trunk@9875 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r--protocols/FacebookRM/src/communication.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index f3e0c19c85..b2eea131b5 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -29,6 +29,13 @@ void facebook_client::client_notify(TCHAR* message)
http::response facebook_client::flap(RequestType request_type, std::string* request_data, std::string* request_get_data, int method)
{
+ http::response resp;
+
+ if (parent->isOffline) {
+ resp.code = HTTP_CODE_FAKE_OFFLINE;
+ return resp;
+ }
+
NETLIBHTTPREQUEST nlhr = {sizeof(NETLIBHTTPREQUEST)};
nlhr.requestType = !method ? choose_method(request_type) : method;
@@ -85,8 +92,6 @@ http::response facebook_client::flap(RequestType request_type, std::string* requ
mir_free(nlhr.headers[3].szValue);
mir_free(nlhr.headers);
- http::response resp;
-
switch (request_type)
{
case REQUEST_LOGIN: