]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Replace assert with log.
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 11 Aug 2009 09:03:37 +0000 (11:03 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 11 Aug 2009 09:03:37 +0000 (11:03 +0200)
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.

nest/proto.c

index 2af077b8010d5f4e53d83cc43ab42f97332064b2..d0792134334cd272a477119230c69fff2426d179 100644 (file)
@@ -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);