diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-14 17:54:37 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-14 17:54:37 +0000 |
commit | 6a4e92c97ce1849f28e70390cc6c65849f85f35c (patch) | |
tree | 1e1e8e7a39902651d7c2b0c7033108122029587b /src/modules/m_ident.cpp | |
parent | f209b0f8fcd052c7713bd621a82a43f261b40dfa (diff) |
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
Diffstat (limited to 'src/modules/m_ident.cpp')
-rw-r--r-- | src/modules/m_ident.cpp | 6 |
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; } |