From: Ondrej Filip Date: Fri, 25 Feb 2000 14:26:54 +0000 (+0000) Subject: Memory allocation in ospf_area changed. X-Git-Tag: v1.2.0~1324 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b786df7035f43bb5eb4f7bca980e3bf684e527b7;p=thirdparty%2Fbird.git Memory allocation in ospf_area changed. --- diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 1cf6175a9..8eae39e34 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -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; } diff --git a/proto/ospf/ospf.h b/proto/ospf/ospf.h index 05e79e731..647debad9 100644 --- a/proto/ospf/ospf.h +++ b/proto/ospf/ospf.h @@ -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); diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 60dbd4f91..7de749de2 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -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... */