From d32c7402ad63175d48579a2779d47800a2dd74c2 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sun, 25 Jan 2015 22:25:52 +0000 Subject: GMailNotifier: - Minors issues fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@11912 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/GmailNotifier/src/check.cpp | 10 ++++++---- plugins/GmailNotifier/src/notify.cpp | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'plugins/GmailNotifier') diff --git a/plugins/GmailNotifier/src/check.cpp b/plugins/GmailNotifier/src/check.cpp index 6e407a1afd..91d475e87c 100644 --- a/plugins/GmailNotifier/src/check.cpp +++ b/plugins/GmailNotifier/src/check.cpp @@ -4,9 +4,9 @@ void CheckMailInbox(Account *curAcc) { - HINTERNET hHTTPOpen; // internet open handle - HINTERNET hHTTPConnection; // internet connection hadle - HINTERNET hHTTPRequest; // internet request hadle + // internet connection handle + // internet request handle + HINTERNET hHTTPConnection = 0, hHTTPRequest = 0; DBVARIANT dbv; static char *contentType = "Content-Type: application/x-www-form-urlencoded"; @@ -37,7 +37,8 @@ void CheckMailInbox(Account *curAcc) mir_strcat(str, "]"); db_set_s(curAcc->hContact, "CList", "MyHandle", str); - hHTTPOpen = InternetOpenA("", INTERNET_OPEN_TYPE_PRECONFIG, "", "", 0); + // internet open handle + HINTERNET hHTTPOpen = InternetOpenA("", INTERNET_OPEN_TYPE_PRECONFIG, "", "", 0); if (!hHTTPOpen) { mir_strcat(curAcc->results.content, Translate("Can't open Internet!")); goto error_handle; @@ -75,6 +76,7 @@ void CheckMailInbox(Account *curAcc) InternetCloseHandle(hHTTPConnection); InternetCloseHandle(hHTTPRequest); + hHTTPRequest = 0; } hHTTPConnection = InternetConnectA(hHTTPOpen, "mail.google.com", INTERNET_DEFAULT_HTTPS_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp index 6961d88cf1..b071fff079 100644 --- a/plugins/GmailNotifier/src/notify.cpp +++ b/plugins/GmailNotifier/src/notify.cpp @@ -182,12 +182,14 @@ void __cdecl Login_ThreadFunc(void *lpParam) mir_strcat(lpPathBuffer, szTempName); } else { + char *szEncodedURL = mir_urlEncode(curAcc->name); mir_strcat(lpPathBuffer, LINK); - mir_strcat(lpPathBuffer, mir_urlEncode(curAcc->name)); + mir_strcat(lpPathBuffer, szEncodedURL); //mir_strcat(lpPathBuffer, "&Passwd="); //mir_strcat(lpPathBuffer, mir_urlEncode(curAcc->pass)); if (opt.AutoLogin == 1) mir_strcat(lpPathBuffer, "&PersistentCookie=yes"); + mir_free(szEncodedURL); } } } -- cgit v1.2.3