summaryrefslogtreecommitdiff
path: root/src/userprocess.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-19 13:07:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-19 13:07:46 +0000
commit2f3ac3d80192a9c4faec3345fffdf07c488b0e8e (patch)
treea91ed660a06a3dbaf61a614066824a067c7dde26 /src/userprocess.cpp
parentca0889d458ab768f32f399c0afe5f4e36dcd07d9 (diff)
SSL is a fucking mess.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2565 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/userprocess.cpp')
-rw-r--r--src/userprocess.cpp21
1 files changed, 10 insertions, 11 deletions
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
{