summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-14 03:56:29 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-14 03:56:29 +0800
commit5f68d7e1a724af13aa4ead16da72bc91bd564e4d (patch)
tree22957646d9048859d9d0778fcb446abebce05201 /util
parent7bcbb8e866cb0c905ff777529f4c8c3721a192c7 (diff)
downloadpttbbs-5f68d7e1a724af13aa4ead16da72bc91bd564e4d.tar
pttbbs-5f68d7e1a724af13aa4ead16da72bc91bd564e4d.tar.gz
pttbbs-5f68d7e1a724af13aa4ead16da72bc91bd564e4d.tar.bz2
pttbbs-5f68d7e1a724af13aa4ead16da72bc91bd564e4d.tar.lz
pttbbs-5f68d7e1a724af13aa4ead16da72bc91bd564e4d.tar.xz
pttbbs-5f68d7e1a724af13aa4ead16da72bc91bd564e4d.tar.zst
pttbbs-5f68d7e1a724af13aa4ead16da72bc91bd564e4d.zip
bugfix: some user will always stay in friends' friend list after logout
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2620 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/shmctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/shmctl.c b/util/shmctl.c
index 0686786a..0bd7e01a 100644
--- a/util/shmctl.c
+++ b/util/shmctl.c
@@ -20,7 +20,7 @@ int logout_friend_online(userinfo_t *utmp)
thefriend = (utmp->friend_online[my_friend_idx] & 0xFFFFFF);
utmp->friend_online[my_friend_idx]=0;
- if( !(0 <= thefriend && thefriend < MAX_ACTIVE) ) {
+ if( !(0 <= thefriend && thefriend < USHM_SIZE) ) {
printf("\tonline friend error(%d)\n", thefriend);
continue;
}
@@ -709,7 +709,7 @@ int nkwbd(int argc, char **argv)
int i;
time_t t = SHM->GV2.e.now - timeout;
- for( i = 0 ; i < MAX_ACTIVE ; ++i )
+ for( i = 0 ; i < USHM_SIZE ; ++i )
if( SHM->uinfo[i].pid &&
SHM->uinfo[i].wbtime &&
SHM->uinfo[i].wbtime < t ){
@@ -842,7 +842,7 @@ int usermode(int argc, char **argv)
{
int i, modes[MAX_MODES];
memset(modes, 0, sizeof(modes));
- for( i = 0 ; i < MAX_ACTIVE ; ++i )
+ for( i = 0 ; i < USHM_SIZE ; ++i )
if( SHM->uinfo[i].userid[0] )
++modes[ (int)SHM->uinfo[i].mode ];