summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index ab4a4dbedc..8ed039cb76 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -157,17 +157,14 @@ int CVkProto::SendMsg(HANDLE hContact, int flags, const char *msg)
return msgId;
}
-void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, void*)
+void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
{
debugLogA("CVkProto::OnSendMessage %d", reply->resultCode);
if (reply->resultCode != 200)
return;
- JSONROOT pRoot(reply->pData);
- if ( !CheckJsonResult(pRoot))
- return;
-
- JSONNODE *pResponse = json_get(pRoot, "response");
+ JSONROOT pRoot;
+ JSONNODE *pResponse = CheckJsonResponse(pReq, reply, pRoot);
if (pResponse != NULL)
m_sendIds.insert((HANDLE)json_as_int(pResponse));
}