summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-12 21:27:01 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-12 21:27:01 +0800
commit15c51977d80677d83fda2a62bcd52e19fb176a7a (patch)
tree3c7864f5ebbe7faff3e61b3b88835128934ace27 /util
parent356ec04277c6fe78c66aeb253caae2100758c40a (diff)
downloadpttbbs-15c51977d80677d83fda2a62bcd52e19fb176a7a.tar
pttbbs-15c51977d80677d83fda2a62bcd52e19fb176a7a.tar.gz
pttbbs-15c51977d80677d83fda2a62bcd52e19fb176a7a.tar.bz2
pttbbs-15c51977d80677d83fda2a62bcd52e19fb176a7a.tar.lz
pttbbs-15c51977d80677d83fda2a62bcd52e19fb176a7a.tar.xz
pttbbs-15c51977d80677d83fda2a62bcd52e19fb176a7a.tar.zst
pttbbs-15c51977d80677d83fda2a62bcd52e19fb176a7a.zip
1.now = time(NULL) instead of time(&now)
2.#if 0 for update_brd 3.fix compilation error when NOKILLWATERBALL & !OUTTATIMER (thanks rafan) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3164 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/shmctl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/util/shmctl.c b/util/shmctl.c
index 6dfc74ff..1a5fd525 100644
--- a/util/shmctl.c
+++ b/util/shmctl.c
@@ -161,7 +161,7 @@ int utmpfix(int argc, char **argv)
#ifdef OUTTA_TIMER
now = SHM->GV2.e.now;
#else
- time(&now);
+ now = time(NULL);
#endif
for( i = 0, nactive = 0 ; i < USHM_SIZE ; ++i )
if( SHM->uinfo[i].pid ){
@@ -664,12 +664,14 @@ int listbrd(int argc, char **argv)
return 0;
}
+#if 0
static void update_brd(int i) {
if(substitute_record(BBSHOME "/" FN_BOARD, &bcache[i],sizeof(boardheader_t),i+1) < 0) {
printf("\n! CANNOT WRITE: " BBSHOME "/" FN_BOARD "\n");
exit(0);
}
}
+#endif
int fixbrd(int argc, char **argv)
{
@@ -798,7 +800,14 @@ int nkwbd(int argc, char **argv)
case 0: /* child */
while( 1 ){
int i;
- time_t t = SHM->GV2.e.now - timeout;
+ time_t now, t;
+
+#ifdef OUTTA_TIMER
+ now = SHM->GV2.e.now;
+#else
+ now = time(NULL);
+#endif
+ t = now - timeout;
for( i = 0 ; i < USHM_SIZE ; ++i )
if( SHM->uinfo[i].pid &&