diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-18 20:53:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-18 20:53:59 +0000 |
commit | 3f23417a1099f73dc28ec1b7d6ec2a1a7fc2b7a2 (patch) | |
tree | 3e0bcd88c55dad310da0dc980e252bf9fbfa6dc5 /src/modules/netlib/netlibhttpproxy.cpp | |
parent | 537b94169bf2483798a651ee3b96f7904eebe7b4 (diff) |
- PLUGININFO structure removed at all;
- Options_AddPage & UserInfo_AddPage replaced MS_OPT_ADDPAGE & MS_USERINFO_ADDPAGE services respectively
- total internal redesign of options' translation
- code reformatting
git-svn-id: http://svn.miranda-ng.org/main/trunk@477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib/netlibhttpproxy.cpp')
-rw-r--r-- | src/modules/netlib/netlibhttpproxy.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/netlib/netlibhttpproxy.cpp b/src/modules/netlib/netlibhttpproxy.cpp index 6b48894d34..7e0472c155 100644 --- a/src/modules/netlib/netlibhttpproxy.cpp +++ b/src/modules/netlib/netlibhttpproxy.cpp @@ -41,7 +41,7 @@ static int HttpGatewayReadSetResult(NetlibConnection *nlc, char *buf, int num, i int rbytes = nlc->dataBufferLen - bytes;
memcpy(buf, nlc->dataBuffer, bytes);
- if (!peek)
+ if ( !peek)
{
memmove(nlc->dataBuffer, nlc->dataBuffer + bytes, rbytes);
nlc->dataBufferLen = rbytes;
@@ -127,13 +127,13 @@ static bool NetlibHttpGatewaySend(struct NetlibConnection *nlc, RequestType reqT bool sameHost = lstrcmpA(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort;
- if (!sameHost)
+ if ( !sameHost)
{
NetlibDoClose(nlc);
mir_free((char*)nlc->nloc.szHost);
nlc->nloc = nloc;
- if (!NetlibDoConnect(nlc))
+ if ( !NetlibDoConnect(nlc))
return false;
}
else
@@ -195,7 +195,7 @@ static bool NetlibHttpGatewayOscarPost(NetlibConnection *nlc, const char *buf, i nlcSend.wProxyPort = nlc->wProxyPort;
nlcSend.proxyType = nlc->proxyType;
- if (!NetlibReconnect(&nlcSend)) return false;
+ if ( !NetlibReconnect(&nlcSend)) return false;
nlc->s2 = nlcSend.s;
nlcSend.hOkToCloseEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
@@ -256,8 +256,8 @@ static bool NetlibHttpGatewayOscarPost(NetlibConnection *nlc, const char *buf, i * with the new plugins that use this code.
*/
- p = ( NetlibHTTPProxyPacketQueue* )mir_alloc(sizeof(struct NetlibHTTPProxyPacketQueue));
- p->dataBuffer = ( PBYTE )mir_alloc(len);
+ p = (NetlibHTTPProxyPacketQueue*)mir_alloc(sizeof(struct NetlibHTTPProxyPacketQueue));
+ p->dataBuffer = (PBYTE)mir_alloc(len);
memcpy(p->dataBuffer, buf, len);
p->dataBufferLen = len;
p->next = NULL;
@@ -292,19 +292,19 @@ int NetlibHttpGatewayRecv(struct NetlibConnection *nlc, char *buf, int len, int {
bool peek = (flags & MSG_PEEK) != 0;
- if (nlc->dataBufferLen != 0 && (!peek || nlc->dataBufferLen >= len))
+ if (nlc->dataBufferLen != 0 && ( !peek || nlc->dataBufferLen >= len))
{
return HttpGatewayReadSetResult(nlc, buf, len, peek);
}
- for (int retryCount = 0; retryCount < NETLIBHTTP_RETRYCOUNT; )
+ for (int retryCount = 0; retryCount < NETLIBHTTP_RETRYCOUNT;)
{
if (nlc->nlhpi.szHttpGetUrl == NULL && retryCount == 0)
{
if (nlc->pollingTimeout == 0) nlc->pollingTimeout = 30;
/* We Need to sleep/wait for the data to send before we do receive */
- for (int pollCount = nlc->pollingTimeout; pollCount--; )
+ for (int pollCount = nlc->pollingTimeout; pollCount--;)
{
if (nlc->pHttpProxyPacketQueue != NULL && GetTickCount() - nlc->lastPost > 1000)
break;
@@ -324,7 +324,7 @@ int NetlibHttpGatewayRecv(struct NetlibConnection *nlc, char *buf, int len, int int numPackets = 0;
if (nlc->nlhpi.szHttpGetUrl)
{
- if (!NetlibHttpGatewaySend(nlc, reqOldGet, NULL, 0))
+ if ( !NetlibHttpGatewaySend(nlc, reqOldGet, NULL, 0))
{
if (GetLastError() == ERROR_ACCESS_DENIED || nlc->termRequested)
break;
@@ -335,7 +335,7 @@ int NetlibHttpGatewayRecv(struct NetlibConnection *nlc, char *buf, int len, int }
else
{
- if (!NetlibHttpGatewayStdPost(nlc, numPackets))
+ if ( !NetlibHttpGatewayStdPost(nlc, numPackets))
{
if (GetLastError() == ERROR_ACCESS_DENIED || nlc->termRequested)
break;
@@ -451,7 +451,7 @@ int NetlibInitHttpConnection(struct NetlibConnection *nlc, struct NetlibUser *nl return 0;
}
}
- if (!nlu->user.pfnHttpGatewayInit(nlc, nloc, nlhrReply))
+ if ( !nlu->user.pfnHttpGatewayInit(nlc, nloc, nlhrReply))
{
NetlibHttpFreeRequestStruct(0, (LPARAM)nlhrReply);
return 0;
@@ -481,7 +481,7 @@ INT_PTR NetlibHttpGatewaySetInfo(WPARAM wParam, LPARAM lParam) NETLIBHTTPPROXYINFO *nlhpi=(NETLIBHTTPPROXYINFO*)lParam;
struct NetlibConnection *nlc=(struct NetlibConnection*)wParam;
- if (GetNetlibHandleType(nlc) != NLH_CONNECTION || nlhpi == NULL ||
+ if (GetNetlibHandleType(nlc) != NLH_CONNECTION || nlhpi == NULL ||
nlhpi->cbSize < (sizeof(NETLIBHTTPPROXYINFO) - sizeof(int)) ||
nlhpi->szHttpPostUrl == NULL)
{
|