summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-13 07:24:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-13 07:24:58 +0000
commit3a08c1d0ba1fe146bd53bdfd5b47e08db745cd5b (patch)
tree50e9220400bf13bcee249e7cec268c29659c12a6 /protocols/VKontakte/src/misc.cpp
parentee03645ddadc46078cea02b2e82d15097ea5560d (diff)
VK: online statuses
git-svn-id: http://svn.miranda-ng.org/main/trunk@6473 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 2d7cc09fca..64dc4d006a 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -38,14 +38,14 @@ void CVkProto::SetAllContactStatuses(int iStatus)
}
}
-HANDLE CVkProto::FindUser(LPCSTR pUserid, bool bCreate)
+HANDLE CVkProto::FindUser(LONG dwUserid, bool bCreate)
{
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- ptrA dbUserid(getStringA(hContact, "ID"));
- if (dbUserid == NULL)
+ LONG dbUserid = getDword(hContact, "ID", -1);
+ if (dbUserid == -1)
continue;
- if ( !strcmp(dbUserid, pUserid))
+ if (dbUserid == dwUserid)
return hContact;
}
@@ -54,7 +54,7 @@ HANDLE CVkProto::FindUser(LPCSTR pUserid, bool bCreate)
HANDLE hNewContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hNewContact, (LPARAM)m_szModuleName);
- setString(hNewContact, "ID", pUserid);
+ setDword(hNewContact, "ID", dwUserid);
db_set_ts(hNewContact, "CList", "Group", m_defaultGroup);
return hNewContact;
}
@@ -193,7 +193,7 @@ CMStringA CVkProto::RunCaptchaForm(LPCSTR szUrl)
NETLIBHTTPREQUEST req = { sizeof(req) };
req.requestType = REQUEST_GET;
req.szUrl = (LPSTR)szUrl;
- req.flags = NLHRF_HTTP11;
+ req.flags = NLHRF_HTTP11 | NLHRF_NODUMPHEADERS;
req.timeout = 60;
NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&req);