diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-29 19:39:43 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-29 19:39:43 +0000 |
commit | 3497a7835487852c87ce33cf918caf12f282ede2 (patch) | |
tree | ff6d0478e2f4ab59db133d74308c8a3ceb86421a | |
parent | f278bdbbad200b5424c5721ac85ee3dd8d982d60 (diff) |
Added output of error if file descriptor given to AddFd is > MAX_DESCRIPTORS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2701 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/socketengine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp index ceb1090f1..b7676e2c2 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -65,7 +65,10 @@ char SocketEngine::GetType(int fd) bool SocketEngine::AddFd(int fd, bool readable, char type) { if ((fd < 0) || (fd > MAX_DESCRIPTORS)) + { + log(DEFAULT,"ERROR: FD of %d added above max of %d",fd,MAX_DESCRIPTORS); return false; + } if (GetRemainingFds() <= 1) { log(DEFAULT,"ERROR: System out of file descriptors!"); |