From 99cefa7694fc89c2830341b2f4d41c0e9ee571a1 Mon Sep 17 00:00:00 2001 From: kcwu Date: Tue, 28 Mar 2006 17:32:33 +0000 Subject: bug fix, clear friend data only when all account logout. allow like/hate oneself. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3311 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- cacheserver/friend.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cacheserver/friend.cpp') diff --git a/cacheserver/friend.cpp b/cacheserver/friend.cpp index a3110ea7..e62a7198 100644 --- a/cacheserver/friend.cpp +++ b/cacheserver/friend.cpp @@ -131,7 +131,6 @@ template struct RelationList: public myvector { RelationList() :myvector() {} void add(Uid me, Uid him) { - assert(me!=him); RelationList& bl=R::backlist(him); short me_offset=append(Relation(him)); short him_offset=bl.append(Relation(me,me_offset)); @@ -201,7 +200,7 @@ struct Utmp { public: Uid utmp[USHM_SIZE]; }; -Utmp utmp; +static Utmp utmp; struct BBSUser { Uid me; @@ -228,11 +227,9 @@ struct BBSUser { online++; assert(online==utmplist.n); for(int i=0; i