From d9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 21:20:14 +0000 Subject: new sorting functions applied git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/netlib/netlibhttp.cpp | 26 +++++++++++++------------- src/modules/netlib/netlibhttpproxy.cpp | 2 +- src/modules/netlib/netlibopts.cpp | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/modules/netlib') diff --git a/src/modules/netlib/netlibhttp.cpp b/src/modules/netlib/netlibhttp.cpp index b7a529853b..a42e9ea700 100644 --- a/src/modules/netlib/netlibhttp.cpp +++ b/src/modules/netlib/netlibhttp.cpp @@ -53,7 +53,7 @@ struct ProxyAuth mir_free(szMethod); } static int Compare(const ProxyAuth* p1, const ProxyAuth* p2) - { return lstrcmpiA(p1->szServer, p2->szServer); } + { return mir_strcmpi(p1->szServer, p2->szServer); } }; struct ProxyAuthList : OBJLIST @@ -202,7 +202,7 @@ static NetlibConnection* NetlibHttpProcessUrl(NETLIBHTTPREQUEST *nlhr, NetlibUse if (nlc != NULL) { bool httpProxy = !(nloc.flags & NLOCF_SSL) && nlc->proxyType == PROXYTYPE_HTTP; - bool sameHost = lstrcmpA(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort; + bool sameHost = mir_strcmp(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort; if (!httpProxy && !sameHost) { NetlibDoClose(nlc); @@ -503,11 +503,11 @@ INT_PTR NetlibHttpSendRequest(WPARAM wParam, LPARAM lParam) doneHostHeader = doneContentLengthHeader = doneProxyAuthHeader = doneAuthHeader = 0; for (i=0; i < nlhr->headersCount; i++) { NETLIBHTTPHEADER &p = nlhr->headers[i]; - if (!lstrcmpiA(p.szName, "Host")) doneHostHeader = 1; - else if (!lstrcmpiA(p.szName, "Content-Length")) doneContentLengthHeader = 1; - else if (!lstrcmpiA(p.szName, "Proxy-Authorization")) doneProxyAuthHeader = 1; - else if (!lstrcmpiA(p.szName, "Authorization")) doneAuthHeader = 1; - else if (!lstrcmpiA(p.szName, "Connection")) continue; + if (!mir_strcmpi(p.szName, "Host")) doneHostHeader = 1; + else if (!mir_strcmpi(p.szName, "Content-Length")) doneContentLengthHeader = 1; + else if (!mir_strcmpi(p.szName, "Proxy-Authorization")) doneProxyAuthHeader = 1; + else if (!mir_strcmpi(p.szName, "Authorization")) doneAuthHeader = 1; + else if (!mir_strcmpi(p.szName, "Connection")) continue; if (p.szValue == NULL) continue; AppendToCharBuffer(&httpRequest, "%s: %s\r\n", p.szName, p.szValue); } @@ -1029,10 +1029,10 @@ next: for (i=0; iheadersCount; i++) { NETLIBHTTPHEADER &p = nlhrReply->headers[i]; - if (!lstrcmpiA(p.szName, "Content-Length")) + if (!mir_strcmpi(p.szName, "Content-Length")) dataLen = atoi(p.szValue); - if (!lstrcmpiA(p.szName, "Content-Encoding")) { + if (!mir_strcmpi(p.szName, "Content-Encoding")) { cenc = i; if (strstr(p.szValue, "gzip")) cenctype = 1; @@ -1040,11 +1040,11 @@ next: cenctype = 2; } - if (!lstrcmpiA(p.szName, "Connection")) - close = !lstrcmpiA(p.szValue, "close"); + if (!mir_strcmpi(p.szName, "Connection")) + close = !mir_strcmpi(p.szValue, "close"); - if (!lstrcmpiA(p.szName, "Transfer-Encoding") && - !lstrcmpiA(p.szValue, "chunked")) + if (!mir_strcmpi(p.szName, "Transfer-Encoding") && + !mir_strcmpi(p.szValue, "chunked")) { chunked = true; chunkhdr = i; diff --git a/src/modules/netlib/netlibhttpproxy.cpp b/src/modules/netlib/netlibhttpproxy.cpp index 5980a1f5b1..47149e1174 100644 --- a/src/modules/netlib/netlibhttpproxy.cpp +++ b/src/modules/netlib/netlibhttpproxy.cpp @@ -119,7 +119,7 @@ static bool NetlibHttpGatewaySend(NetlibConnection *nlc, RequestType reqType, co NETLIBOPENCONNECTION nloc; NetlibConnFromUrl(nlhrSend.szUrl, false, nloc); - bool sameHost = lstrcmpA(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort; + bool sameHost = mir_strcmp(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort; if (!sameHost) { diff --git a/src/modules/netlib/netlibopts.cpp b/src/modules/netlib/netlibopts.cpp index 332e0f723a..92102b044e 100644 --- a/src/modules/netlib/netlibopts.cpp +++ b/src/modules/netlib/netlibopts.cpp @@ -105,7 +105,7 @@ static void CopySettingsStruct(NETLIBUSERSETTINGS *dest, NETLIBUSERSETTINGS *sou static void CombineSettingsStrings(char **dest, char **source) { - if (*dest != NULL && (*source == NULL || lstrcmpiA(*dest, *source))) { mir_free(*dest); *dest = NULL; } + if (*dest != NULL && (*source == NULL || mir_strcmpi(*dest, *source))) { mir_free(*dest); *dest = NULL; } } static void CombineSettingsStructs(NETLIBUSERSETTINGS *dest, DWORD *destFlags, NETLIBUSERSETTINGS *source, DWORD sourceFlags) -- cgit v1.2.3