summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_http.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather/src/weather_http.cpp')
-rw-r--r--plugins/Weather/src/weather_http.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp
index 63ea78b03a..10bcf63690 100644
--- a/plugins/Weather/src/weather_http.cpp
+++ b/plugins/Weather/src/weather_http.cpp
@@ -26,7 +26,6 @@ from the web using netlib
#include "stdafx.h"
HNETLIBUSER hNetlibUser;
-HNETLIBCONN hNetlibHttp;
static int findHeader(const NETLIBHTTPREQUEST *nlhrReply, const char *hdr)
{
@@ -67,7 +66,6 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, wchar_t **s
nlhr.requestType = REQUEST_GET;
nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11 | NLHRF_PERSISTENT | NLHRF_REDIRECT;
nlhr.szUrl = szUrl;
- nlhr.nlc = hNetlibHttp;
nlhr.headers = headers;
nlhr.headersCount = _countof(headers);
@@ -81,7 +79,6 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, wchar_t **s
*szData = (wchar_t*)mir_alloc(512);
// store the error code in szData
mir_wstrcpy(*szData, L"NetLib error occurred!!");
- hNetlibHttp = nullptr;
return NLHRF_REDIRECT;
}
@@ -142,7 +139,6 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, wchar_t **s
result = nlhrReply->resultCode;
}
- hNetlibHttp = nlhrReply->nlc;
// make a copy of the retrieved data, then free the memory of the http reply
Netlib_FreeHttpRequest(nlhrReply);
return result;
@@ -159,13 +155,3 @@ void NetlibInit(void)
nlu.szDescriptiveName.w = TranslateT("Weather HTTP connections");
hNetlibUser = Netlib_RegisterUser(&nlu);
}
-
-void NetlibHttpDisconnect(void)
-{
- if (hNetlibHttp) {
- HANDLE hConn = hNetlibHttp;
- hNetlibHttp = nullptr;
- Netlib_CloseHandle(hConn);
- }
-}
-