diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-24 19:22:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-24 19:22:39 +0000 |
commit | 19ab68c3d146d0d0dc24e9c8153e90d218395209 (patch) | |
tree | 0e5a8d34a25dafa1d1fb71cddd9e5d7528c116e1 /protocols/GTalkExt/src/inbox.cpp | |
parent | fb190494fe8550288e5c8741bebec9ab0f58284e (diff) |
GTalkExt: contact list contact restored
git-svn-id: http://svn.miranda-ng.org/main/trunk@6214 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src/inbox.cpp')
-rw-r--r-- | protocols/GTalkExt/src/inbox.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 471431a185..4343ae6fe2 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -66,8 +66,7 @@ const DWORD SIZE_OF_JABBER_OPTIONS = 243 * sizeof(DWORD); LPSTR HttpPost(HANDLE hUser, LPSTR reqUrl, LPSTR reqParams)
{
- NETLIBHTTPREQUEST nlhr = {0};
- nlhr.cbSize = sizeof(nlhr);
+ NETLIBHTTPREQUEST nlhr = { sizeof(nlhr) };
nlhr.requestType = REQUEST_POST;
nlhr.flags = NLHRF_GENERATEHOST | NLHRF_SMARTAUTHHEADER | NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP | NLHRF_NODUMPHEADERS;
nlhr.szUrl = reqUrl;
@@ -240,13 +239,17 @@ void OpenUrl(LPCSTR acc, LPCTSTR mailbox, LPCTSTR url) mir_forkthread(ShellExecuteThread, mir_tstrdup(url));
}
-void OpenContactInbox(LPCSTR acc)
+void OpenContactInbox(HANDLE hContact)
{
- DBVARIANT dbv;
- if ( db_get_ts(0, acc, "jid", &dbv))
+ LPSTR acc = GetContactProto(hContact);
+ if (!acc)
+ return;
+
+ ptrT tszJid( db_get_tsa(0, acc, "jid"));
+ if (tszJid == NULL)
return;
- LPTSTR host = _tcschr(dbv.ptszVal, '@');
+ LPTSTR host = _tcschr(tszJid, '@');
if (!host)
return;
*host++ = 0;
@@ -256,7 +259,5 @@ void OpenContactInbox(LPCSTR acc) mir_sntprintf(buf, SIZEOF(buf), INBOX_URL_FORMAT, _T("a/"), host); // hosted
else
mir_sntprintf(buf, SIZEOF(buf), INBOX_URL_FORMAT, _T(""), _T("mail")); // common
- OpenUrl(acc, dbv.ptszVal, buf);
-
- db_free(&dbv);
+ OpenUrl(acc, tszJid, buf);
}
|