Iface chstate run only if something really change.

This commit is contained in:
Ondrej Filip 2000-04-18 18:01:26 +00:00
parent dd100e40c6
commit 1508ee8b53

View file

@ -11,12 +11,13 @@
char *ospf_is[]={ "down", "loop", "waiting", "point-to-point", "drother", char *ospf_is[]={ "down", "loop", "waiting", "point-to-point", "drother",
"backup", "dr" }; "backup", "dr" };
void void
iface_chstate(struct ospf_iface *ifa, u8 state) iface_chstate(struct ospf_iface *ifa, u8 state)
{ {
struct proto *p; struct proto *p;
if(ifa->state!=state)
{
p=(struct proto *)(ifa->proto); p=(struct proto *)(ifa->proto);
debug("%s: Changing state of iface: %s from \"%s\" into \"%s\".\n", debug("%s: Changing state of iface: %s from \"%s\" into \"%s\".\n",
p->name, ifa->iface->name, ospf_is[ifa->state], ospf_is[state]); 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 void