summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-21 12:29:59 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-21 12:29:59 +0800
commit394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d (patch)
tree0fb4ad7e3900ca899eba26b21901673664865a75
parent7561ee63d1db3fbb7a16bfb984c0d69109cc836a (diff)
downloadpttbbs-394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d.tar
pttbbs-394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d.tar.gz
pttbbs-394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d.tar.bz2
pttbbs-394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d.tar.lz
pttbbs-394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d.tar.xz
pttbbs-394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d.tar.zst
pttbbs-394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d.zip
1.fix infinite loop
斷線->abort_bbs()->丟好友下站水球->好友已下站(why?) ->顯示好友已下站"請按任意鍵繼續"->getch->發現斷線->abort_bbs() 2.use searched result in do_aloha instead of searching again in my_write() git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2271 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/mbbsd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index ea541e5b..9693c6dd 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -130,7 +130,10 @@ void
u_exit(char *mode)
{
//userec_t xuser;
- int diff = (time(0) - login_start_time) / 60;
+ int diff = (time(0) - login_start_time) / 60;
+ int dirty = currmode & MODE_DIRTY;
+
+ currmode = 0;
/* close fd 0 & 1 to terminate network */
close(0);
@@ -153,7 +156,7 @@ u_exit(char *mode)
do_aloha("<<Uq>> -- ڨoI");
purge_utmp(currutmp);
- if ((cuser.uflag != enter_uflag) || (currmode & MODE_DIRTY) || diff) {
+ if ((cuser.uflag != enter_uflag) || dirty || diff) {
if (!diff && cuser.numlogins)
cuser.numlogins = --cuser.numlogins;
/* Leeym Wdɶ */
@@ -985,7 +988,7 @@ do_aloha(char *hello)
userinfo_t *uentp;
if ((uentp = (userinfo_t *) search_ulist_userid(userid)) &&
isvisible(uentp, currutmp)) {
- my_write(uentp->pid, genbuf, uentp->userid, WATERBALL_ALOHA, NULL);
+ my_write(uentp->pid, genbuf, uentp->userid, WATERBALL_ALOHA, uentp);
}
}
fclose(fp);