summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-06-15 11:38:45 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-06-15 11:38:45 +0800
commitb6bf009ed80da05dc716cbadf08467454428d830 (patch)
treeb2dc1b44f718df8b094b40edf90af7e3a5c9b5c7
parentf8727e6e00af447c7938ac23ed98a383a1eefe77 (diff)
downloadpttbbs-b6bf009ed80da05dc716cbadf08467454428d830.tar
pttbbs-b6bf009ed80da05dc716cbadf08467454428d830.tar.gz
pttbbs-b6bf009ed80da05dc716cbadf08467454428d830.tar.bz2
pttbbs-b6bf009ed80da05dc716cbadf08467454428d830.tar.lz
pttbbs-b6bf009ed80da05dc716cbadf08467454428d830.tar.xz
pttbbs-b6bf009ed80da05dc716cbadf08467454428d830.tar.zst
pttbbs-b6bf009ed80da05dc716cbadf08467454428d830.zip
Fix segv when user keeps login rapidly (and disconnects when seeing that msg).
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@6010 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/talk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/talk.c b/pttbbs/mbbsd/talk.c
index 793a97d8..9e8a0db3 100644
--- a/pttbbs/mbbsd/talk.c
+++ b/pttbbs/mbbsd/talk.c
@@ -261,7 +261,10 @@ int sync_outta_server(int sfd, int do_login)
outs("登入太頻繁, 為避免系統負荷過重, 請稍後再試\n");
refresh();
log_usies("REJECTLOGIN", NULL);
+ // We can't do u_exit because some resources like friends are not ready.
+ currmode = 0;
memset(currutmp, 0, sizeof(userinfo_t));
+ // user will try to disconnect here and cause abort_bbs.
sleep(30);
exit(0);
}