From 394d32d7d1cc0d95a737e9c027e6f0c6d8834a8d Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 21 Oct 2004 04:29:59 +0000 Subject: =?UTF-8?q?1.fix=20infinite=20loop=20=20=20=20=20=E6=96=B7?= =?UTF-8?q?=E7=B7=9A->abort=5Fbbs()->=E4=B8=9F=E5=A5=BD=E5=8F=8B=E4=B8=8B?= =?UTF-8?q?=E7=AB=99=E6=B0=B4=E7=90=83->=E5=A5=BD=E5=8F=8B=E5=B7=B2?= =?UTF-8?q?=E4=B8=8B=E7=AB=99(why=3F)=20=09->=E9=A1=AF=E7=A4=BA=E5=A5=BD?= =?UTF-8?q?=E5=8F=8B=E5=B7=B2=E4=B8=8B=E7=AB=99"=E8=AB=8B=E6=8C=89?= =?UTF-8?q?=E4=BB=BB=E6=84=8F=E9=8D=B5=E7=B9=BC=E7=BA=8C"->getch->?= =?UTF-8?q?=E7=99=BC=E7=8F=BE=E6=96=B7=E7=B7=9A->abort=5Fbbs()=202.use=20s?= =?UTF-8?q?earched=20result=20in=20do=5Faloha=20instead=20of=20searching?= =?UTF-8?q?=20again=20in=20my=5Fwrite()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2271 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/mbbsd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mbbsd') 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("<<下站通知>> -- 我走囉!"); 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 上站停留時間限制式 */ @@ -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); -- cgit v1.2.3