diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-25 09:06:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-25 09:06:37 +0000 |
commit | 8aa669fbc78ce229f45105df09ac25a2df8b8eff (patch) | |
tree | 14ea6da3b83456da5f0c421d3b7691415b68093f /protocols/GTalkExt/src/inbox.cpp | |
parent | a881be4206c532a8d7dd1d65fbeed1e1a89e84d2 (diff) |
Google contact removed from clist
git-svn-id: http://svn.miranda-ng.org/main/trunk@4185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src/inbox.cpp')
-rw-r--r-- | protocols/GTalkExt/src/inbox.cpp | 43 |
1 files changed, 12 insertions, 31 deletions
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 3e0bd96932..4faf247172 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -164,6 +164,7 @@ void OpenUrlThread(void *param) HANDLE hUser = FindNetUserHandle(data->acc);
if (!hUser || !AuthAndOpen(hUser, data->url, data->mailbox, data->pwd))
CallService(MS_UTILS_OPENURL, 0, (LPARAM)data->url);
+ free(data);
}
void __forceinline DecryptString(LPSTR str, int len)
@@ -209,38 +210,18 @@ BOOL OpenUrlWithAuth(LPCSTR acc, LPCTSTR mailbox, LPCTSTR url) int mailboxLen = lstrlen(mailbox) + 1;
OPEN_URL_HEADER *data = (OPEN_URL_HEADER*)malloc(sizeof(OPEN_URL_HEADER) + urlLen + mailboxLen + pwdLen);
- __try {
- data->url = (LPSTR)data + sizeof(OPEN_URL_HEADER);
- LPSTR ansi = WtoA(url);
- __try {
- memcpy(data->url, ansi, urlLen);
- }
- __finally {
- free(ansi);
- }
-
- data->mailbox = data->url + urlLen;
- ansi = WtoA(mailbox);
- __try {
- memcpy(data->mailbox, ansi, mailboxLen);
- }
- __finally {
- free(ansi);
- }
-
- data->pwd = data->mailbox + mailboxLen;
- if (!GetMailboxPwd(acc, mailbox, &data->pwd, pwdLen))
- return FALSE;
-
- data->acc = acc;
-
- mir_forkthread(OpenUrlThread, data);
- data = NULL;
- }
- __finally {
- free(data);
- }
+ data->url = (LPSTR)data + sizeof(OPEN_URL_HEADER);
+ memcpy(data->url, _T2A(url), urlLen);
+
+ data->mailbox = data->url + urlLen;
+ memcpy(data->mailbox, _T2A(mailbox), mailboxLen);
+
+ data->pwd = data->mailbox + mailboxLen;
+ if (!GetMailboxPwd(acc, mailbox, &data->pwd, pwdLen))
+ return FALSE;
+ data->acc = acc;
+ mir_forkthread(OpenUrlThread, data);
return TRUE;
}
|