diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-06-30 18:20:27 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-06-30 18:20:27 +0000 |
commit | 98c703511ca335514d72f0207796131b134bbffc (patch) | |
tree | c6dbfc509f5cb353d4bee60d8555ea12861fde5e /include/modules.h | |
parent | e5c8ee880b8d122abded2aee54d25641db5e3d4f (diff) |
Tweak to IS_LOCAL macro to exclude invalid fd's that are > MAX_DESCRIPTORS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4091 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index d303f7c72..25e309f55 100644 --- a/include/modules.h +++ b/include/modules.h @@ -144,7 +144,7 @@ typedef std::map<std::string,Module*> featurelist; // useful macros -#define IS_LOCAL(x) (x->fd > -1) +#define IS_LOCAL(x) ((x->fd > -1) && (x->fd <= MAX_DESCRIPTORS)) #define IS_REMOTE(x) (x->fd < 0) #define IS_MODULE_CREATED(x) (x->fd == FD_MAGIC_NUMBER) |