summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WASocketConnection.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-02-10 21:27:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-02-10 21:27:38 +0000
commite3506fe66886912cee16a91793d17010a87eecef (patch)
treeb06ba97cf876baa40ca4ed1bda85f9e932e435f9 /protocols/WhatsApp/src/WASocketConnection.cpp
parent327745289de431e7e7dad6e4ce0eb8cef43eaeb5 (diff)
various rudiments & atavisms exterminated
git-svn-id: http://svn.miranda-ng.org/main/trunk@12085 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WASocketConnection.cpp')
-rw-r--r--protocols/WhatsApp/src/WASocketConnection.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/protocols/WhatsApp/src/WASocketConnection.cpp b/protocols/WhatsApp/src/WASocketConnection.cpp
index 3d8744a91f..188bc023be 100644
--- a/protocols/WhatsApp/src/WASocketConnection.cpp
+++ b/protocols/WhatsApp/src/WASocketConnection.cpp
@@ -72,26 +72,20 @@ int WASocketConnection::waitForRead()
void WASocketConnection::flush() {}
-void WASocketConnection::write(const std::vector<unsigned char>& bytes, int offset, int length)
+void WASocketConnection::write(const std::vector<unsigned char> &bytes, int length)
{
NETLIBBUFFER nlb;
std::string tmpBuf = std::string(bytes.begin(), bytes.end());
- nlb.buf = (char*)&(tmpBuf.c_str()[offset]);
+ nlb.buf = (char*)&(tmpBuf.c_str()[0]);
nlb.len = length;
nlb.flags = MSG_NODUMP;
- int result = CallService(MS_NETLIB_SEND, reinterpret_cast<WPARAM>(this->hConn),
- reinterpret_cast<LPARAM>(&nlb));
+ int result = CallService(MS_NETLIB_SEND, WPARAM(hConn), LPARAM(&nlb));
if (result < length) {
throw WAException(getLastErrorMsg(), WAException::SOCKET_EX, WAException::SOCKET_EX_SEND);
}
}
-void WASocketConnection::write(const std::vector<unsigned char>& bytes, int length)
-{
- this->write(bytes, 0, length);
-}
-
unsigned char WASocketConnection::read()
{
SetLastError(0);