diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-07 19:58:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-07 19:58:12 +0000 |
commit | 8e0c637454c5797a5a9ce02968480a1847676f29 (patch) | |
tree | 338a13fd5ba397d6953d254b0fafda8c90bcab40 /src | |
parent | 182ef2d733ab983ce6cc089a321c1699e95de69f (diff) |
NLHR_PTR moved to m_netlib.h by request
git-svn-id: http://svn.miranda-ng.org/main/trunk@14058 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/netlib/netlibhttp.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/netlib/netlibhttp.cpp b/src/modules/netlib/netlibhttp.cpp index cd7a173f1a..3fe48d5dc1 100644 --- a/src/modules/netlib/netlibhttp.cpp +++ b/src/modules/netlib/netlibhttp.cpp @@ -410,12 +410,12 @@ INT_PTR NetlibHttpSendRequest(WPARAM wParam, LPARAM lParam) int bytesSent;
bool lastFirstLineFail = false;
- if (nlhr == NULL || nlhr->cbSize < NETLIBHTTPREQUEST_V1_SIZE || nlhr->szUrl == NULL || nlhr->szUrl[0] == '\0') {
+ if (nlhr == NULL || nlhr->cbSize != sizeof(NETLIBHTTPREQUEST) || nlhr->szUrl == NULL || nlhr->szUrl[0] == '\0') {
SetLastError(ERROR_INVALID_PARAMETER);
return SOCKET_ERROR;
}
- int hdrTimeout = nlhr->cbSize > NETLIBHTTPREQUEST_V1_SIZE && nlhr->timeout ? nlhr->timeout : HTTPRECVHEADERSTIMEOUT;
+ int hdrTimeout = (nlhr->timeout) ? nlhr->timeout : HTTPRECVHEADERSTIMEOUT;
const char *pszRequest;
switch(nlhr->requestType) {
@@ -831,10 +831,9 @@ INT_PTR NetlibHttpTransaction(WPARAM wParam, LPARAM lParam) {
NetlibUser *nlu = (NetlibUser*)wParam;
NETLIBHTTPREQUEST *nlhr = (NETLIBHTTPREQUEST*)lParam, *nlhrReply;
- DWORD dflags, hflags;
if (GetNetlibHandleType(nlu) != NLH_USER || !(nlu->user.flags & NUF_OUTGOING) ||
- nlhr == NULL || nlhr->cbSize < NETLIBHTTPREQUEST_V1_SIZE ||
+ nlhr == NULL || nlhr->cbSize != sizeof(NETLIBHTTPREQUEST) ||
nlhr->szUrl == NULL || nlhr->szUrl[0] == 0)
{
SetLastError(ERROR_INVALID_PARAMETER);
@@ -891,11 +890,11 @@ INT_PTR NetlibHttpTransaction(WPARAM wParam, LPARAM lParam) if (!doneUserAgentHeader || !doneAcceptEncoding)
mir_free(nlhrSend.headers);
- dflags = (nlhr->flags & NLHRF_DUMPASTEXT ? MSG_DUMPASTEXT:0) |
+ DWORD dflags = (nlhr->flags & NLHRF_DUMPASTEXT ? MSG_DUMPASTEXT : 0) |
(nlhr->flags & NLHRF_NODUMP ? MSG_NODUMP : (nlhr->flags & NLHRF_DUMPPROXY ? MSG_DUMPPROXY : 0)) |
(nlhr->flags & NLHRF_NOPROXY ? MSG_RAW : 0);
- hflags =
+ DWORD hflags =
(nlhr->flags & NLHRF_NODUMP ? MSG_NODUMP : (nlhr->flags & NLHRF_DUMPPROXY ? MSG_DUMPPROXY : 0)) |
(nlhr->flags & NLHRF_NOPROXY ? MSG_RAW : 0);
|