diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-09-04 14:04:51 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-09-04 14:04:51 +0000 |
commit | bb81def84fd84bb6e762e556169ae081b67569f8 (patch) | |
tree | 20992bff1320bec1ce3b60b4a3b3cda3506c4219 /protocols/FacebookRM/src/communication.cpp | |
parent | 8234832e06e873df035270f162d7d151fbf6e7eb (diff) |
Facebook: Use persistent connection again
git-svn-id: http://svn.miranda-ng.org/main/trunk@17247 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 452a6fe24a..1ef867d44f 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -59,49 +59,40 @@ http::response facebook_client::sendRequest(HttpRequest *request) request->flags |= NLHRF_NODUMP; #endif - // FIXME: Support persistent connection for various requests - /* // Set persistent connection (or not) - switch (request_type) { - case REQUEST_LOGIN: + switch (request->Persistent) { + case ChannelRequest::NONE: request->nlc = NULL; + request->flags &= ~NLHRF_PERSISTENT; break; - - case REQUEST_MESSAGES_RECEIVE: + case ChannelRequest::CHANNEL: request->nlc = hMsgCon; request->flags |= NLHRF_PERSISTENT; break; - - default: + case ChannelRequest::DEFAULT: WaitForSingleObject(fcb_conn_lock_, INFINITE); request->nlc = hFcbCon; request->flags |= NLHRF_PERSISTENT; break; } - */ + parent->debugLogA("@@@ Sending request to '%s'", request->szUrl); // Send the request NETLIBHTTPREQUEST *pnlhr = request->Send(handle_); - // FIXME: Support persistent connection for various requests - /* // Remember the persistent connection handle (or not) - switch (request_type) { - case REQUEST_LOGIN: - case REQUEST_SETUP_MACHINE: + switch (request->Persistent) { + case ChannelRequest::NONE: break; - - case REQUEST_MESSAGES_RECEIVE: + case ChannelRequest::CHANNEL: hMsgCon = pnlhr ? pnlhr->nlc : NULL; break; - - default: + case ChannelRequest::DEFAULT: ReleaseMutex(fcb_conn_lock_); hFcbCon = pnlhr ? pnlhr->nlc : NULL; break; } - */ // Check and copy response data if (pnlhr != NULL) { |