From 0072a0880c077fc0a21fd57214e6c5bf8497402a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 26 Jan 2015 00:17:21 +0000 Subject: first version that logs in git-svn-id: http://svn.miranda-ng.org/main/trunk@11913 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WASocketConnection.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/WhatsApp/src/WASocketConnection.cpp') diff --git a/protocols/WhatsApp/src/WASocketConnection.cpp b/protocols/WhatsApp/src/WASocketConnection.cpp index c688492e4e..2ff362b9bf 100644 --- a/protocols/WhatsApp/src/WASocketConnection.cpp +++ b/protocols/WhatsApp/src/WASocketConnection.cpp @@ -58,15 +58,10 @@ int WASocketConnection::waitForRead() int fd = 0; FD_ZERO(&rfds); - // _LOGDATA("preparando select"); - //fd = (this->socket)->channel; //#!? - // _LOGDATA("socket %d", fd); FD_SET(fd, &rfds); tv.tv_sec = 600; //ApplicationData::SELECT_TIMEOUT; tv.tv_usec = 0; // 5000000; tvp = &tv; - //if (ApplicationData::SELECT_TIMEOUT == -1) #TODO - // tvp = NULL; int retval = select(/*fd + 1*/ 0, &rfds, NULL, NULL, tvp); if (!FD_ISSET(fd, &rfds)) @@ -83,7 +78,7 @@ void WASocketConnection::write(const std::vector& bytes, int offs std::string tmpBuf = std::string(bytes.begin(), bytes.end()); nlb.buf = (char*)&(tmpBuf.c_str()[offset]); nlb.len = length; - nlb.flags = 0; //MSG_NOHTTPGATEWAYWRAP | MSG_NODUMP; + nlb.flags = MSG_NODUMP; int result = CallService(MS_NETLIB_SEND, reinterpret_cast(this->hConn), reinterpret_cast(&nlb)); @@ -154,6 +149,11 @@ void WASocketConnection::dump(const void *pData, int length) } } +void WASocketConnection::log(const char *str) +{ + Netlib_Logf(WASocketConnection::hNetlibUser, "STR: %s", str); +} + WASocketConnection::~WASocketConnection() { this->forceShutdown(); -- cgit v1.2.3