Iface chstate run only if something really change.
This commit is contained in:
parent
dd100e40c6
commit
1508ee8b53
1 changed files with 30 additions and 28 deletions
|
@ -11,12 +11,13 @@
|
|||
char *ospf_is[]={ "down", "loop", "waiting", "point-to-point", "drother",
|
||||
"backup", "dr" };
|
||||
|
||||
|
||||
void
|
||||
iface_chstate(struct ospf_iface *ifa, u8 state)
|
||||
{
|
||||
struct proto *p;
|
||||
|
||||
if(ifa->state!=state)
|
||||
{
|
||||
p=(struct proto *)(ifa->proto);
|
||||
debug("%s: Changing state of iface: %s from \"%s\" into \"%s\".\n",
|
||||
p->name, ifa->iface->name, ospf_is[ifa->state], ospf_is[state]);
|
||||
|
@ -52,6 +53,7 @@ iface_chstate(struct ospf_iface *ifa, u8 state)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue