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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp
index 429f8f654c..5567dff83f 100644
--- a/plugins/Weather/src/weather_http.cpp
+++ b/plugins/Weather/src/weather_http.cpp
@@ -44,7 +44,7 @@ static int findHeader(const NETLIBHTTPREQUEST *nlhrReply, const char *hdr)
// return value = 0 for success, 1 or HTTP error code for failure
// global var used: szData, szInfo = containing the retrieved data
//
-int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szData)
+int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, wchar_t **szData)
{
if (userAgent == NULL || userAgent[0] == 0)
userAgent = NETLIB_USER_AGENT;
@@ -77,7 +77,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD
NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&nlhr);
if (nlhrReply == 0) {
// if the data does not downloaded successfully (ie. disconnected), then return 1000 as error code
- *szData = (TCHAR*)mir_alloc(512);
+ *szData = (wchar_t*)mir_alloc(512);
// store the error code in szData
mir_tstrcpy(*szData, L"NetLib error occurred!!");
hNetlibHttp = NULL;
@@ -124,7 +124,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD
}
}
- TCHAR *retVal = NULL;
+ wchar_t *retVal = NULL;
if (bIsUtf)
retVal = mir_utf8decodeT(nlhrReply->pData);
if (retVal == NULL)
@@ -135,7 +135,7 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, TCHAR **szD
}
// return error code if the recieved code is neither 200 OK nor 302 Moved
else {
- *szData = (TCHAR*)mir_alloc(512);
+ *szData = (wchar_t*)mir_alloc(512);
// store the error code in szData
mir_sntprintf(*szData, 512, L"Error occured! HTTP Error: %i\n", nlhrReply->resultCode);
result = nlhrReply->resultCode;