From e4d40cffe1660427a8883fd426000b666ea44ed3 Mon Sep 17 00:00:00 2001 From: kcwu Date: Sun, 21 Jun 2009 16:35:40 +0000 Subject: * move structure used in UTMPD mode to daemons.h git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4690 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- daemon/utmpd/friend.cpp | 1 + daemon/utmpd/utmpserver.c | 1 + daemon/utmpd/utmpserver2.c | 1 + daemon/utmpd/utmpserver3.c | 1 + include/daemons.h | 10 ++++++++++ include/pttstruct.h | 9 --------- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/daemon/utmpd/friend.cpp b/daemon/utmpd/friend.cpp index 5497ee2e..13d29070 100644 --- a/daemon/utmpd/friend.cpp +++ b/daemon/utmpd/friend.cpp @@ -4,6 +4,7 @@ // for some constant and type #include "bbs.h" +#include "daemons.h" /* for each login of user, * input: my index, friend[MAX_FRIEND] of uid, reject[MAX_REJECT] of uid, diff --git a/daemon/utmpd/utmpserver.c b/daemon/utmpd/utmpserver.c index 62b54a41..f50d3b0f 100644 --- a/daemon/utmpd/utmpserver.c +++ b/daemon/utmpd/utmpserver.c @@ -1,5 +1,6 @@ /* $Id$ */ #include "bbs.h" +#include "daemons.h" #include struct { diff --git a/daemon/utmpd/utmpserver2.c b/daemon/utmpd/utmpserver2.c index ce79c0c7..6c375823 100644 --- a/daemon/utmpd/utmpserver2.c +++ b/daemon/utmpd/utmpserver2.c @@ -3,6 +3,7 @@ #include #include "bbs.h" +#include "daemons.h" extern void utmplogin(int uid, int index, const int like[MAX_FRIEND], const int hate[MAX_REJECT]); extern int genfriendlist(int uid, int index, ocfs_t *fs, int maxfs); diff --git a/daemon/utmpd/utmpserver3.c b/daemon/utmpd/utmpserver3.c index da833d03..18d5d94a 100644 --- a/daemon/utmpd/utmpserver3.c +++ b/daemon/utmpd/utmpserver3.c @@ -5,6 +5,7 @@ #include #include "bbs.h" +#include "daemons.h" extern void utmplogin(int uid, int index, const int like[MAX_FRIEND], const int hate[MAX_REJECT]); extern int genfriendlist(int uid, int index, ocfs_t *fs, int maxfs); diff --git a/include/daemons.h b/include/daemons.h index 7d6d6217..84168d11 100644 --- a/include/daemons.h +++ b/include/daemons.h @@ -51,6 +51,16 @@ typedef struct login_data } login_data; +/////////////////////////////////////////////////////////////////////// +// online friend relation daemon +// +typedef struct { + int index; // 在 SHM->uinfo[index] + int uid; // 避免在 cache server 上不同步, 再確認用. + int friendstat; + int rfriendstat; +} ocfs_t; + #endif // _BBS_DAEMONS_H // vim:et diff --git a/include/pttstruct.h b/include/pttstruct.h index c7a9d57e..200f66ff 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -658,13 +658,4 @@ typedef struct { char y; } Horder_t; -#ifdef UTMPD -typedef struct { - int index; // b SHM->uinfo[index] - int uid; // קKb cache server WPB, AT{. - int friendstat; - int rfriendstat; -} ocfs_t; -#endif - #endif -- cgit v1.2.3