summaryrefslogtreecommitdiff
path: root/src/modules/m_ident.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-07-05 03:04:41 +0200
committerattilamolnar <attilamolnar@hush.com>2012-07-13 17:20:39 +0200
commit3f11cf21b155957d4b0321f932a85ec6556f6116 (patch)
tree079a5738a471d4007a31fcb2c13f6bc162830cb1 /src/modules/m_ident.cpp
parent41c26a03fac6915c0abcde17bacb6563c50719e5 (diff)
m_ident Close the socket and mark as done when received something instead of doing it in two places before returning
Diffstat (limited to 'src/modules/m_ident.cpp')
-rw-r--r--src/modules/m_ident.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index b7c9c1cfd..163487f70 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -216,15 +216,17 @@ class IdentRequestSocket : public EventHandler
char ibuf[MAXBUF];
int recvresult = ServerInstance->SE->Recv(this, ibuf, MAXBUF-1, 0);
+ /* Close (but don't delete from memory) our socket
+ * and flag as done since the ident lookup has finished
+ */
+ Close();
+ done = true;
+
/* Cant possibly be a valid response shorter than 3 chars,
* because the shortest possible response would look like: '1,1'
*/
if (recvresult < 3)
- {
- Close();
- done = true;
return;
- }
ServerInstance->Logs->Log("m_ident",DEBUG,"ReadResponse()");
@@ -263,13 +265,6 @@ class IdentRequestSocket : public EventHandler
break;
}
-
- /* Close (but dont delete from memory) our socket
- * and flag as done
- */
- Close();
- done = true;
- return;
}
};