From 3f414550504c0b467a26616df10010d2ccbfc8b2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 10 Sep 2014 11:19:13 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@10420 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_queue.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols/VKontakte/src/vk_queue.cpp') 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; -- cgit v1.2.3