diff options
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/client.h | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/connection.cpp | 3 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 7 |
4 files changed, 15 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/client.h b/protocols/FacebookRM/src/client.h index 6110943167..240910b49a 100644 --- a/protocols/FacebookRM/src/client.h +++ b/protocols/FacebookRM/src/client.h @@ -45,6 +45,8 @@ public: fcb_conn_lock_ = NULL;
handle_ = NULL;
parent = NULL;
+
+ mbasicWorks = true;
}
HANDLE hMsgCon;
@@ -85,6 +87,8 @@ public: int chat_msgs_recv_;
volatile unsigned int chat_req_;
+ bool mbasicWorks;
+
////////////////////////////////////////////////////////////
// Client vs protocol communication
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index bc8f8a11e5..395bd70bad 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -246,7 +246,7 @@ std::string facebook_client::choose_server(RequestType request_type) case REQUEST_LOAD_FRIENDSHIPS: case REQUEST_SEARCH: case REQUEST_USER_INFO_MOBILE: - return FACEBOOK_SERVER_MBASIC; + return this->mbasicWorks ? FACEBOOK_SERVER_MBASIC : FACEBOOK_SERVER_MOBILE; // case REQUEST_LOGOUT: // case REQUEST_BUDDY_LIST: diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp index 1406a497f9..608c4522ae 100644 --- a/protocols/FacebookRM/src/connection.cpp +++ b/protocols/FacebookRM/src/connection.cpp @@ -105,6 +105,9 @@ void FacebookProto::ChangeStatus(void*) ResetEvent(update_loop_lock_); + // Workaround for not working "mbasic." for some users - reset this flag at every login + facy.mbasicWorks = true; + if (NegotiateConnection() && facy.home() && facy.reconnect()) { // Load all friends diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 6ec0683538..9f115394ab 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -1139,6 +1139,13 @@ void FacebookProto::ProcessFriendRequests(void*) // Get notifications http::response resp = facy.flap(REQUEST_LOAD_FRIENDSHIPS); + // Workaround not working "mbasic." website for some people + if (!resp.isValid()) { + // Remember it didn't worked and try it again (internally it will try "m." this time) + facy.mbasicWorks = false; + resp = facy.flap(REQUEST_LOAD_FRIENDSHIPS); + } + if (resp.code != HTTP_CODE_OK) { facy.handle_error("friendRequests"); return; |