fixed misused read and write #4313

This commit is contained in:
XinyuHou
2015-01-26 13:23:11 +00:00
parent 06253c965b
commit 10cddb97a8
9 changed files with 185 additions and 107 deletions

View File

@@ -50,11 +50,9 @@ TCPSocketFactory::create(bool secure) const
{
IDataSocket* socket = NULL;
if (secure) {
void* args[4] = {
void* args[2] = {
m_events,
m_socketMultiplexer,
Log::getInstance(),
Arch::getInstance()
m_socketMultiplexer
};
socket = static_cast<IDataSocket*>(
ARCH->plugin().invoke(s_networkSecurity, "getSecureSocket", args));
@@ -71,11 +69,9 @@ TCPSocketFactory::createListen(bool secure) const
{
IListenSocket* socket = NULL;
if (secure) {
void* args[4] = {
void* args[2] = {
m_events,
m_socketMultiplexer,
Log::getInstance(),
Arch::getInstance()
m_socketMultiplexer
};
socket = static_cast<IListenSocket*>(
ARCH->plugin().invoke(s_networkSecurity, "getSecureListenSocket", args));