diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-23 19:20:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-23 19:20:50 +0000 |
commit | 7a1aca929a8b8a12d87d5c8c086cd7b82dcde5e5 (patch) | |
tree | 610437b569adabf27ca5a1e576f26e4d65947372 /protocols | |
parent | 8ed8b8bee2fa6abdfaa4b92543070baef0f340cb (diff) |
VK: this clutch considered useless
git-svn-id: http://svn.miranda-ng.org/main/trunk@6603 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 1b73c38180..d567558863 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -488,23 +488,17 @@ int CVkProto::PollServer() {
debugLogA("CVkProto::PollServer");
- NETLIBHTTPREQUEST req = { sizeof(req) }, *reply;
+ NETLIBHTTPREQUEST req = { sizeof(req) };
req.requestType = REQUEST_GET;
req.szUrl = NEWSTR_ALLOCA(CMStringA().Format("%s?act=a_check&key=%s&ts=%s&wait=25&access_token=%s", m_pollingServer, m_pollingKey, m_pollingTs, m_szAccessToken));
req.flags = NLHRF_NODUMPHEADERS | NLHRF_HTTP11 | NLHRF_PERSISTENT;
req.timeout = 30000;
+ req.nlc = m_pollingConn;
- while (true) {
- req.nlc = m_pollingConn;
- __try {
- reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&req);
- if (reply == NULL)
- return 0;
- break;
- }
- __except(EXCEPTION_EXECUTE_HANDLER) {
- m_pollingConn = NULL;
- }
+ NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&req);
+ if (reply == NULL) {
+ m_pollingConn = NULL;
+ return 0;
}
int retVal = 0;
|