diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-07 13:12:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-07 13:12:43 +0000 |
commit | a5184b5e19951983bb9f699807cd9c5cf206c7ce (patch) | |
tree | 2f6d73676790a44dd3e194f7825abb36864de6f8 /protocols/Yahoo/src/http_gateway.cpp | |
parent | 1d18d087d47d7a54f68950f983029642a54d6f43 (diff) |
YAHOO search -> utf8
git-svn-id: http://svn.miranda-ng.org/main/trunk@14049 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/src/http_gateway.cpp')
-rw-r--r-- | protocols/Yahoo/src/http_gateway.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/protocols/Yahoo/src/http_gateway.cpp b/protocols/Yahoo/src/http_gateway.cpp index 9fbfdcb57f..5136a26196 100644 --- a/protocols/Yahoo/src/http_gateway.cpp +++ b/protocols/Yahoo/src/http_gateway.cpp @@ -20,11 +20,11 @@ int YAHOO_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPRE NETLIBHTTPPROXYINFO nlhpi;
debugLogA("YAHOO_httpGatewayInit!!!");
-
+
memset(&nlhpi, 0, sizeof(nlhpi));
nlhpi.cbSize = sizeof(nlhpi);
nlhpi.szHttpPostUrl = "http://shttp.msg.yahoo.com/notify/";
-
+
return CallService(MS_NETLIB_SETHTTPPROXYINFO, (WPARAM)hConn, (LPARAM)&nlhpi);
}
@@ -36,7 +36,7 @@ int YAHOO_httpGatewayWrapSend(HANDLE hConn, PBYTE buf, int len, int flags, MIRAN int n;
char *z = yahoo_webmessenger_idle_packet(m_id, &n);
int ret = 0;
-
+
if (z != NULL) {
debugLogA("YAHOO_httpGatewayWrapSend!!! Got Len: %d", n);
NETLIBBUFFER tBuf = { ( char* )z, n, flags };
@@ -45,38 +45,38 @@ int YAHOO_httpGatewayWrapSend(HANDLE hConn, PBYTE buf, int len, int flags, MIRAN } else {
debugLogA("YAHOO_httpGatewayWrapSend!!! GOT NULL???");
}
-
+
return ret;
} else {
NETLIBBUFFER tBuf = { ( char* )buf, len, flags };
-
+
return pfnNetlibSend((LPARAM)hConn, (WPARAM) &tBuf );
}
}
PBYTE YAHOO_httpGatewayUnwrapRecv(NETLIBHTTPREQUEST *nlhr, PBYTE buf, int len, int *outBufLen, void *(*NetlibRealloc)(void *, size_t))
{
- debugLogA("YAHOO_httpGatewayUnwrapRecv!!! Len: %d", len);
+ debugLogA("YAHOO_httpGatewayUnwrapRecv!!! Len: %d", len);
- debugLogA("Got headers: %d", nlhr->headersCount);
- /* we need to get the first 4 bytes! */
+ debugLogA("Got headers: %d", nlhr->headersCount);
+ /* we need to get the first 4 bytes! */
if (len < 4)
return NULL;
ylad->rpkts = buf[0] + buf[1] *256;
debugLogA("Got packets: %d", ylad->rpkts);
-
- if (len == 4) {
- *outBufLen = 0;
- return buf;
- } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G')) {
+
+ if (len == 4) {
+ *outBufLen = 0;
+ return buf;
+ } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G')) {
memmove( buf, buf + 4, len - 4);
*outBufLen = len-4;// we take off 4 bytes from the beginning
-
+
return buf;
- } else
- return NULL; /* Break connection, something went wrong! */
-
+ } else
+ return NULL; /* Break connection, something went wrong! */
+
}
#endif
|