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",
|
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]);
|
||||||
|
@ -53,6 +54,7 @@ iface_chstate(struct ospf_iface *ifa, u8 state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
downint(struct ospf_iface *ifa)
|
downint(struct ospf_iface *ifa)
|
||||||
|
|
Loading…
Reference in a new issue