summaryrefslogtreecommitdiff
path: root/protocols/GTalkExt/src/inbox.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-03-27 10:24:54 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-03-27 10:24:54 +0000
commit6e9ace645b7d24ed0fe60f4b7714d3bb11739dfc (patch)
tree10c6c2c8666a7421744910f9ab58630dc88dd47c /protocols/GTalkExt/src/inbox.cpp
parent61efc6be20aa4315e9e524dffeb9b5c812ab19cc (diff)
GTalkExt: icon added to icolib
git-svn-id: http://svn.miranda-ng.org/main/trunk@16553 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src/inbox.cpp')
-rw-r--r--protocols/GTalkExt/src/inbox.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp
index c58533f122..e97e6a02c0 100644
--- a/protocols/GTalkExt/src/inbox.cpp
+++ b/protocols/GTalkExt/src/inbox.cpp
@@ -62,17 +62,8 @@ LPSTR HttpPost(HANDLE hUser, LPSTR reqUrl, LPSTR reqParams)
nlhr.pData = reqParams;
nlhr.dataLength = (int)mir_strlen(reqParams);
- NETLIBHTTPREQUEST *pResp = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hUser, (LPARAM)&nlhr);
- if (!pResp) return NULL;
- __try {
- if (HTTP_OK == pResp->resultCode)
- return mir_strdup(pResp->pData);
- else
- return NULL;
- }
- __finally {
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pResp);
- }
+ NLHR_PTR pResp((NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hUser, (LPARAM)&nlhr));
+ return ((pResp && pResp->resultCode == HTTP_OK) ? mir_strdup(pResp->pData) : nullptr);
}
LPSTR MakeRequest(HANDLE hUser, LPSTR reqUrl, LPSTR reqParamsFormat, LPSTR p1, LPSTR p2)