diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-26 00:17:21 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-26 00:17:21 +0000 |
commit | 0072a0880c077fc0a21fd57214e6c5bf8497402a (patch) | |
tree | a4c4a2667fbca02b195ebc5c268752ab3a407aea /protocols/WhatsApp/src/WASocketConnection.cpp | |
parent | d32c7402ad63175d48579a2779d47800a2dd74c2 (diff) |
first version that logs in
git-svn-id: http://svn.miranda-ng.org/main/trunk@11913 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WASocketConnection.cpp')
-rw-r--r-- | protocols/WhatsApp/src/WASocketConnection.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<unsigned char>& 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<WPARAM>(this->hConn),
reinterpret_cast<LPARAM>(&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();
|