summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_ident.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index da0181148..68934ae68 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -35,6 +35,9 @@
Server *Srv;
+// State engine constants. We have three states,
+// connecting, waiting for data, and finished.
+
#define IDENT_STATE_CONNECT 1
#define IDENT_STATE_WAITDATA 2
#define IDENT_STATE_DONE 3
@@ -77,6 +80,7 @@ class RFC1413
timeout = false;
if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
{
+ // theres been a boo-boo... no more fd's left for us, woe is me!
Srv->Log(DEBUG,"Ident: socket failed for: "+std::string(user->ip));
return false;
}
@@ -91,8 +95,10 @@ class RFC1413
if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1)
{
+ // theres been an error, but EINPROGRESS just means 'right, im on it, call me later'
if (errno != EINPROGRESS)
{
+ // ... so that error isnt fatal, like the rest.
Srv->Log(DEBUG,"Ident: connect failed for: "+std::string(user->ip));
return false;
}