]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Moved initialization of protocol list to proto.c.
authorMartin Mares <mj@ucw.cz>
Mon, 6 Dec 1999 13:44:45 +0000 (13:44 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 6 Dec 1999 13:44:45 +0000 (13:44 +0000)
Added sysdep configuration hooks.

conf/conf.c
conf/conf.h
nest/proto.c

index 4e2f920d14365e88044672328ee41c5ac311d07d..ea65183b8075ac692403cf755101334813378646 100644 (file)
@@ -31,7 +31,6 @@ config_alloc(byte *name)
 
   c->pool = p;
   cfg_mem = c->mem = l;
-  init_list(&c->protos);
   c->file_name = cfg_strdup(name);
   return c;
 }
@@ -45,6 +44,7 @@ config_parse(struct config *c)
   if (setjmp(conf_jmpbuf))
     return 0;
   cf_lex_init(0);
+  sysdep_preconfig(c);
   protos_preconfig(c);
   rt_preconfig(c);
   cf_parse();
@@ -80,6 +80,7 @@ void
 config_commit(struct config *c)
 {
   config = c;
+  sysdep_commit(c);
   rt_commit(c);
   protos_commit(c);
 }
index 957ce443490a964dd86574fc41703d4e733a5038..b0a3811826a121e34d0c95d6953da93fc8a8d12c 100644 (file)
@@ -18,6 +18,7 @@ struct config {
   linpool *mem;                                /* Linear pool containing configuration data */
   list protos;                         /* Configured protocol instances (struct proto_config) */
   list tables;                         /* Configured routing tables (struct rtable_config) */
+  list logfiles;                       /* Configured log fils (sysdep) */
   struct rtable_config *master_rtc;    /* Configuration of master routing table */
   u32 router_id;                       /* Our Router ID */
   char *err_msg;                       /* Parser error message */
@@ -83,4 +84,9 @@ void cf_pop_scope(void);
 
 int cf_parse(void);
 
+/* Sysdep hooks */
+
+void sysdep_preconfig(struct config *);
+void sysdep_commit(struct config *);
+
 #endif
index a0beb5fb8a73b1eebf848d63503810e9fc458421..ab7de0f6fbfac33759045fadae26b78df8aec788 100644 (file)
@@ -155,6 +155,7 @@ protos_preconfig(struct config *c)
   init_list(&inactive_proto_list);
   init_list(&initial_proto_list);
   init_list(&flush_proto_list);
+  init_list(&c->protos);
   debug("Protocol preconfig:");
   WALK_LIST(p, protocol_list)
     {