summaryrefslogtreecommitdiff
path: root/server/main.c
diff options
context:
space:
mode:
authorGravatar Greg Hudson <ghudson@mit.edu>1994-10-31 00:35:24 +0000
committerGravatar Greg Hudson <ghudson@mit.edu>1994-10-31 00:35:24 +0000
commit01fec09421a037aad09fe20aa144509bf4521ca3 (patch)
tree75530c23bc1650a21102c05e473c51876a371f89 /server/main.c
parent2d272b7e42c6da45cc81c504854c042f0c900d24 (diff)
Some unnecessary code eliminated; initialize t_local earlier on
to avoid some timer problems; dump triplet database along with subscriptions so we can check consistency.
Diffstat (limited to 'server/main.c')
-rw-r--r--server/main.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/server/main.c b/server/main.c
index 2fed1d0..c378bde 100644
--- a/server/main.c
+++ b/server/main.c
@@ -57,7 +57,7 @@ static char rcsid_main_c[] =
<stdio.h>
<sys/file.h>
<syslog.h>
- <string.h>
+ <strings.h>
<signal.h>
timer.h
zsrv_err.h
@@ -242,6 +242,9 @@ main(argc, argv)
for retransmits, initialize error tables,
set up restricted classes */
+ /* Initialize t_local for other uses */
+ (void) gettimeofday(&t_local, (struct timezone *)0);
+
if (initialize())
exit(1);
@@ -313,7 +316,7 @@ main(argc, argv)
syslog(LOG_NOTICE, "Ready for action");
- /* Initialize t_local for other uses */
+ /* Reinitialize t_local now that initialization is done. */
(void) gettimeofday(&t_local, (struct timezone *)0);
/* GO! */
uptime = NOW;
@@ -442,17 +445,9 @@ initialize()
class_hm = make_zstring(HM_CTL_CLASS, 1);
class_ulogin = make_zstring(LOGIN_CLASS, 1);
class_ulocate = make_zstring(LOCATE_CLASS, 1);
- wildcard_class = make_zstring(MATCHALL_CLASS, 1);
wildcard_instance = make_zstring(WILDCARD_INSTANCE, 1);
empty = make_zstring("", 0);
- matchall_sub.q_forw = &matchall_sub;
- matchall_sub.q_back = &matchall_sub;
- matchall_sub.zst_dest.classname = wildcard_class;
- matchall_sub.zst_dest.inst = dup_zstring(empty);
- matchall_sub.zst_dest.recip = dup_zstring(empty);
-
- set_ZDestination_hash(&matchall_sub.zst_dest);
/* restrict certain classes */
access_init();
return(0);
@@ -670,6 +665,7 @@ static void dump_db()
server_dump_servers(fp);
uloc_dump_locs(fp);
hostm_dump_hosts(fp);
+ class_dump_subs(fp);
syslog(LOG_INFO, "dump done");
if (fclose(fp) == EOF) {
syslog(LOG_ERR, "can't close dump db");