diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-13 07:47:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-13 07:47:08 +0000 |
commit | 7ee4e8dc6a95e14c5d565f6172be02ea5ee1f4d9 (patch) | |
tree | bd94d553ddb796e58da365c93e13f6d0a3307b9e /protocols/VKontakte/src/vk_thread.cpp | |
parent | 2224b7cfa5a1adb17fcec0e14fa3c5e507446291 (diff) |
userid became LONG everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@6475 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 43f495756f..50bb8df30e 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -184,9 +184,8 @@ void CVkProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *reply, void*) JSONNODE *it = json_at(pResponse, i);
LPCSTR id = json_name(it);
if ( !_stricmp(id, "user_id")) {
- ptrT userid( json_as_string(it));
- m_myUserId = mir_t2a(userid);
- setTString("ID", userid);
+ m_myUserId = json_as_int(it);
+ setDword("ID", m_myUserId);
}
else if ( !_stricmp(id, "user_name"))
setTString("Nick", ptrT( json_as_string(it)));
@@ -212,8 +211,11 @@ void CVkProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *reply, void*) /////////////////////////////////////////////////////////////////////////////////////////
-void CVkProto::RetrieveUserInfo(LPCSTR szUserId)
+void CVkProto::RetrieveUserInfo(LONG userID)
{
+ char szUserId[40];
+ _itoa(userID, szUserId, 10);
+
HttpParam params[] = {
{ "fields", "uid,first_name,last_name,photo,sex,bdate,city,relation" },
{ "uids", szUserId },
@@ -241,8 +243,8 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, void*) JSONNODE *it = json_at(pResponse, i);
LPCSTR id = json_name(it);
if ( !_stricmp(id, "user_id")) {
- ptrA userid( _T2A( json_as_string(it)));
- if ( !lstrcmpA(userid, m_myUserId))
+ LONG userid = json_as_int(it);
+ if (userid == m_myUserId)
hContact = NULL;
else if ((hContact = FindUser(userid, false)) == NULL)
return;
|