summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-25 23:14:19 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-25 23:14:19 +0000
commit612988aeb323df99c68c3082384b2bdd39e7eb86 (patch)
tree8542fe77c8c948079a55f522c68cf73d6cfbf5c7 /include
parentbbfb8b0de3093bf0e85b4aab85bc5cf74294637c (diff)
- s_auth.c, s_auth.h: optimized so we save unecessary auth_doing_list
traversals. Patch provided by Adam. git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2930 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'include')
-rw-r--r--include/s_auth.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/s_auth.h b/include/s_auth.h
index dcac37b..f2b256a 100644
--- a/include/s_auth.h
+++ b/include/s_auth.h
@@ -27,12 +27,16 @@
#ifndef INCLUDED_s_auth_h
#define INCLUDED_s_auth_h
-/*
- * flag values for AuthRequest
- * NAMESPACE: AM_xxx - Authentication Module
- */
-#define AM_DOING_AUTH 0x1
-#define AM_DNS_PENDING 0x2
+enum
+{
+ AM_IN_AUTH = 1 << 0,
+ AM_DOING_AUTH = 1 << 1,
+ AM_DNS_PENDING = 1 << 2
+};
+
+#define SetInAuth(x) ((x)->flags |= AM_IN_AUTH)
+#define ClearInAuth(x) ((x)->flags &= ~AM_IN_AUTH)
+#define IsInAuth(x) ((x)->flags & AM_IN_AUTH)
#define SetDNSPending(x) ((x)->flags |= AM_DNS_PENDING)
#define ClearDNSPending(x) ((x)->flags &= ~AM_DNS_PENDING)