diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-10 11:19:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-10 11:19:13 +0000 |
commit | 3f414550504c0b467a26616df10010d2ccbfc8b2 (patch) | |
tree | 26d3b627d069fb74eb80782f5bf25a9119b30374 /protocols/VKontakte/src/vk_queue.cpp | |
parent | 655ec3411bd8d1c934500e7c4be6fd13c5ae3245 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@10420 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_queue.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_queue.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index bd0dc9f103..82fece41cc 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -37,23 +37,23 @@ void CVkProto::ExecuteRequest(AsyncHttpRequest *pReq) CMStringA str;
LBL_Restart:
- if (pReq->m_szParam.IsEmpty())
- pReq->szUrl = pReq->m_szUrl.GetBuffer();
- else if (pReq->requestType == REQUEST_GET){
+ if (pReq->requestType == REQUEST_GET) {
str.Format("%s?%s", pReq->m_szUrl, pReq->m_szParam);
pReq->szUrl = str.GetBuffer();
}
- else{
+ else {
pReq->szUrl = pReq->m_szUrl.GetBuffer();
- pReq->pData = mir_strdup(pReq->m_szParam.GetBuffer());
- pReq->dataLength = pReq->m_szParam.GetLength();
+ if (!pReq->m_szParam.IsEmpty()) {
+ pReq->pData = mir_strdup(pReq->m_szParam.GetBuffer());
+ pReq->dataLength = pReq->m_szParam.GetLength();
+ }
}
NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)pReq);
if (reply != NULL) {
if (pReq->m_pFunc != NULL)
(this->*(pReq->m_pFunc))(reply, pReq);
-
+
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)reply);
if (pReq->bNeedsRestart)
goto LBL_Restart;
|