summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 8063d80c..2d6fc0dd 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -192,9 +192,11 @@ remove_from_uhash(int n)
#warning "searchuser() average chaining MAX_USERS/(1<<HASH_BITS) times."
#endif
int
-searchuser(const char *userid, char *rightid)
+dosearchuser(const char *userid, char *rightid)
{
int h, p, times;
+ if(userid[0]=='\0')
+ return 0;
STATINC(STAT_SEARCHUSER);
h = StringHash(userid)%(1<<HASH_BITS);
p = SHM->hash_head[h];
@@ -211,6 +213,14 @@ searchuser(const char *userid, char *rightid)
}
int
+searchuser(const char *userid, char *rightid)
+{
+ if(userid[0]=='\0')
+ return 0;
+ return dosearchuser(userid, rightid);
+}
+
+int
getuser(const char *userid, userec_t *xuser)
{
int uid;