]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Memory allocation in ospf_area changed.
authorOndrej Filip <feela@network.cz>
Fri, 25 Feb 2000 14:26:54 +0000 (14:26 +0000)
committerOndrej Filip <feela@network.cz>
Fri, 25 Feb 2000 14:26:54 +0000 (14:26 +0000)
proto/ospf/ospf.c
proto/ospf/ospf.h
proto/ospf/topology.c

index 1cf6175a9e8461d01aa8a6fb2bb3076a9a43f26f..8eae39e34824a03107e85be6b1d645c7b2c0195c 100644 (file)
@@ -25,7 +25,6 @@ ospf_start(struct proto *p)
 
   po->areano=0;                /* Waiting for interfaces comming up */
   po->firstarea=NULL;
-  po->areaslab=sl_new(p->pool, sizeof(struct ospf_area));
   return PS_UP;
 }
 
index 05e79e7316e3ae662b11d2cc263be51b187d05ae..647debad95a0d7ec055b65094d8677c166915562 100644 (file)
@@ -220,7 +220,6 @@ struct proto_ospf {
   list iface_list;             /* Interfaces we really use */
   int areano;                  /* Number of area I belong to */
   struct ospf_area *firstarea;
-  slab *areaslab;
 };
 
 static int ospf_start(struct proto *p);
index 60dbd4f91939e1b21adc41565091c0315b3b7f40..7de749de257b00175a07cedbce8a1594c0b8edb0 100644 (file)
@@ -46,10 +46,11 @@ addifa_rtlsa(struct ospf_iface *ifa)
   {
     po->areano++;
     oa=po->firstarea;
-    po->firstarea=sl_alloc(po->areaslab);
+    po->firstarea=mb_alloc(po->proto.pool, sizeof(struct ospf_area));
     po->firstarea->next=oa;
     po->firstarea->areaid=ifa->area;
     po->firstarea->gr=ospf_top_new(po);
+    DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->area);
   }
 
   /* FIXME Go on, change router lsa, bits and so on... */