summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-10 12:17:08 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-10 12:17:08 +0800
commit7c766bf44d652f4f4ffad199c3fc556f82195d1f (patch)
treeaf59791178a0c95d604038051fd24e8572adaeea /mbbsd
parent883bf638558fbc87bacccbf5ee2b065382337b4f (diff)
downloadpttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar
pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.gz
pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.bz2
pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.lz
pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.xz
pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.tar.zst
pttbbs-7c766bf44d652f4f4ffad199c3fc556f82195d1f.zip
Change tobind/toconnect interface.
**OUTTACACHE is now UTMPD** git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4121 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/cal.c7
-rw-r--r--mbbsd/mbbsd.c2
-rw-r--r--mbbsd/talk.c8
3 files changed, 10 insertions, 7 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index 91ec3cf0..d37f1100 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -624,8 +624,11 @@ p_sysinfo(void)
#ifdef CRITICAL_MEMORY
" CRITICAL_MEMORY"
#endif
-#ifdef OUTTACACHE
- " OUTTACACHE"
+#ifdef UTMPD
+ " UTMPD"
+#endif
+#ifdef FROMD
+ " FROMD"
#endif
);
}
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index a45c2705..13e8159c 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -962,7 +962,7 @@ setup_utmp(int mode)
#ifdef FROMD
{
int fd;
- if ( (fd = toconnect(FROMD_HOST, FROMD_PORT)) >= 0 ) {
+ if ( (fd = toconnect(FROMD_ADDR)) >= 0 ) {
write(fd, fromhost, strlen(fromhost));
// uinfo.from is zerod, so we don't care about read length
read(fd, uinfo.from, sizeof(uinfo.from));
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index ea694467..b4c92915 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -241,7 +241,7 @@ reverse_friend_stat(int stat)
return stat1;
}
-#ifdef OUTTACACHE
+#ifdef UTMPD
int sync_outta_server(int sfd)
{
int i;
@@ -309,14 +309,14 @@ void login_friend_online(void)
int i, stat, stat1;
int offset = (int)(currutmp - &SHM->uinfo[0]);
-#ifdef OUTTACACHE
+#ifdef UTMPD
int sfd;
- /* OUTTACACHE is TOO slow, let's prompt user here. */
+ /* UTMPD is TOO slow, let's prompt user here. */
move(b_lines-2, 0); clrtobot();
outs("\n正在更新與同步線上使用者及好友名單,系統負荷量大時會需時較久...\n");
refresh();
- sfd = toconnect(OUTTACACHEHOST, OUTTACACHEPORT);
+ sfd = toconnect(UTMPD_ADDR);
if(sfd>=0) {
int res=sync_outta_server(sfd);
if(res==0) // sfd will be closed if return 0