diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-04-23 10:10:06 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-04-23 10:10:06 +0800 |
commit | ec531a47c5f3680d8d9013c804d8a1f8c8b33498 (patch) | |
tree | df14651f4a5c9b82d7a622ea0d4aeae1295804e8 /mbbsd/talk.c | |
parent | 945cf121ce0dfea9c37183eff0b05760bdef3a1d (diff) | |
download | pttbbs-ec531a47c5f3680d8d9013c804d8a1f8c8b33498.tar pttbbs-ec531a47c5f3680d8d9013c804d8a1f8c8b33498.tar.gz pttbbs-ec531a47c5f3680d8d9013c804d8a1f8c8b33498.tar.bz2 pttbbs-ec531a47c5f3680d8d9013c804d8a1f8c8b33498.tar.lz pttbbs-ec531a47c5f3680d8d9013c804d8a1f8c8b33498.tar.xz pttbbs-ec531a47c5f3680d8d9013c804d8a1f8c8b33498.tar.zst pttbbs-ec531a47c5f3680d8d9013c804d8a1f8c8b33498.zip |
don't save user data if shm corrupted
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2712 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r-- | mbbsd/talk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c index aad4a45c..deaddd9d 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -2693,12 +2693,14 @@ t_users(void) int mode0 = currutmp->mode; int stat0 = currstat; - if( cuser.userid[0] != currutmp->userid[0] ){ + assert(strncmp(cuser.userid, currutmp->userid, IDLEN)==0); + if( strncmp(cuser.userid , currutmp->userid, IDLEN) != 0 ){ if( HAS_PERM(PERM_SYSOP) ) vmsg("warning: currutmp userid is changed"); else abort_bbs(0); } + setutmpmode(LUSERS); userlist(); currutmp->mode = mode0; |