summaryrefslogtreecommitdiff
path: root/src/modules/netlib
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-24 16:18:00 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-24 16:18:00 +0000
commitcff526fc610fe0166b59c25bcb7730b92b481480 (patch)
treee6a4d06f31ac5134d67fee3405f37ebab1a5054d /src/modules/netlib
parent2e9daaee6cdf51423daa89b1dbae37e1424d549f (diff)
fix for the Sounds options
git-svn-id: http://svn.miranda-ng.org/main/trunk@604 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib')
-rw-r--r--src/modules/netlib/netlibbind.cpp9
-rw-r--r--src/modules/netlib/netlibhttp.cpp4
2 files changed, 5 insertions, 8 deletions
diff --git a/src/modules/netlib/netlibbind.cpp b/src/modules/netlib/netlibbind.cpp
index ada02da36e..0b6aca709d 100644
--- a/src/modules/netlib/netlibbind.cpp
+++ b/src/modules/netlib/netlibbind.cpp
@@ -191,18 +191,15 @@ INT_PTR NetlibBindPort(WPARAM wParam, LPARAM lParam)
int foundPort = 0;
UINT dwThreadId;
- if (GetNetlibHandleType(nlu) != NLH_USER || !(nlu->user.flags & NUF_INCOMING) ||
+ if (GetNetlibHandleType(nlu) != NLH_USER || !(nlu->user.flags & NUF_INCOMING) ||
nlb == NULL || nlb->pfnNewConnection == NULL)
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
- if (nlb->cbSize != sizeof(NETLIBBIND) &&
- nlb->cbSize != NETLIBBIND_SIZEOF_V2 &&
- nlb->cbSize != NETLIBBIND_SIZEOF_V1)
- {
+ if (nlb->cbSize != sizeof(NETLIBBIND))
return 0;
- }
+
nlbp = (NetlibBoundPort*)mir_calloc(sizeof(NetlibBoundPort));
nlbp->handleType = NLH_BOUNDPORT;
nlbp->nlu = nlu;
diff --git a/src/modules/netlib/netlibhttp.cpp b/src/modules/netlib/netlibhttp.cpp
index 1805558ac3..520f371917 100644
--- a/src/modules/netlib/netlibhttp.cpp
+++ b/src/modules/netlib/netlibhttp.cpp
@@ -909,7 +909,7 @@ INT_PTR NetlibHttpRecvHeaders(WPARAM wParam, LPARAM lParam)
{
peol = strchr(pbuffer, '\n');
if (peol == NULL) break;
- if (peol == pbuffer || (peol == (pbuffer + 1) && *pbuffer == '\r'))
+ if (peol == pbuffer || (peol == (pbuffer + 1) && *pbuffer == '\r'))
{
bytesPeeked = peol - buffer + 1;
headersCompleted = true;
@@ -936,7 +936,7 @@ INT_PTR NetlibHttpRecvHeaders(WPARAM wParam, LPARAM lParam)
for (pbuffer = buffer, headersCount = 0;; pbuffer = peol + 1, ++headersCount)
{
peol = strchr(pbuffer, '\n');
- if (peol == NULL || peol == pbuffer || (peol == (pbuffer + 1) && *pbuffer == '\r')) break;
+ if (peol == NULL || peol == pbuffer || (peol == (pbuffer + 1) && *pbuffer == '\r')) break;
*peol = 0;
char *pColon = strchr(pbuffer, ':');