From 01fec09421a037aad09fe20aa144509bf4521ca3 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Mon, 31 Oct 1994 00:35:24 +0000 Subject: 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. --- server/main.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'server/main.c') 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[] = - + 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"); -- cgit v1.2.3