From 6a4e92c97ce1849f28e70390cc6c65849f85f35c Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 14 Apr 2005 17:54:37 +0000 Subject: More nice comments (this module is kind of a flagship for a few new method calls) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1093 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_ident.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules') 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; } -- cgit v1.2.3