Better dumping in neighbor chstate.

This commit is contained in:
Ondrej Filip 2000-04-18 17:58:16 +00:00
parent 8914e37dc0
commit dd100e40c6

View file

@ -8,6 +8,9 @@
#include "ospf.h"
char *ospf_ns[]={"down", "attempt", "init", "2way", "exstart", "exchange",
"loading", "full"};
void
neigh_chstate(struct ospf_neighbor *n, u8 state)
{
@ -19,8 +22,8 @@ neigh_chstate(struct ospf_neighbor *n, u8 state)
ifa=n->ifa;
p=(struct proto *)(ifa->proto);
debug("%s: Neigbor '%u' changes state from %u to %u.\n", p->name, n->rid,
n->state, state);
debug("%s: Neigbor '%u' changes state from \"%u\" to \"%u\".\n",
p->name, n->rid, ospf_ns[n->state], ospf_ns[state]);
n->state=state;
}
}