summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/communication.cpp
diff options
context:
space:
mode:
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: