From 2f3ac3d80192a9c4faec3345fffdf07c488b0e8e Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 19 Dec 2005 13:07:46 +0000 Subject: SSL is a fucking mess. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2565 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/userprocess.cpp') diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 31cb6b68e..6fc62cbdb 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -83,18 +83,17 @@ void ProcessUser(userrec* cu) log(DEBUG,"Processing user with fd %d",cu->fd); if (Config->GetIOHook(cu->port)) { - int MOD_RESULT = 0; int result2 = 0; - Config->GetIOHook(cu->port)->OnRawSocketRead(cu->fd,data,65535,result2); - if (!MOD_RESULT) - { - result = cu->ReadData(data, 65535); - } - else - { - log(DEBUG,"Data result returned by module: %d",MOD_RESULT); - result = result2; - } + int MOD_RESULT = Config->GetIOHook(cu->port)->OnRawSocketRead(cu->fd,data,65535,result2); + log(DEBUG,"Data result returned by module: %d",MOD_RESULT); + if (MOD_RESULT < 0) + { + result = EAGAIN; + } + else + { + result = result2; + } } else { -- cgit v1.2.3