From: Ondrej Zajicek Date: Tue, 11 Aug 2009 09:03:37 +0000 (+0200) Subject: Replace assert with log. X-Git-Tag: v1.2.0~37^2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac07aacd2cdb5cf69a3bfdbc0e078cb0ae96c0db;p=thirdparty%2Fbird.git Replace assert with log. Although it is true unless there is a bug in BIRD, this assert is not needed (code below does not require that assumption), so we should not crash. --- diff --git a/nest/proto.c b/nest/proto.c index 2af077b80..d07921343 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -515,7 +515,9 @@ static void proto_fell_down(struct proto *p) { DBG("Protocol %s down\n", p->name); - ASSERT(p->stats.imp_routes == 0); + + if (p->stats.imp_routes != 0) + log(L_ERR "Protocol %s is down but still has %d routes", p->name, p->stats.imp_routes); bzero(&p->stats, sizeof(struct proto_stats)); rt_unlock_table(p->table);