diff options
author | Martin Mares <mj@ucw.cz> | 2000-05-16 13:43:26 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-05-16 13:43:26 +0000 |
commit | df9f0fb30a7046872eff21624a315d5fd56e938f (patch) | |
tree | 7ae96014fc94ba23ea640db451ca90da738d4e87 /nest/proto.c | |
parent | f990fc61e0dd13ae90c9bbff811736dfd52988b0 (diff) |
Don't log state changes if nothing user-visible has changed.
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nest/proto.c b/nest/proto.c index dab40a6c..e81aadc9 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -59,7 +59,17 @@ proto_relink(struct proto *p) { list *l; - PD(p, "State changed to %s", proto_state_name(p)); + if (p->debug & D_STATES) + { + char *name = proto_state_name(p); + if (name != p->last_state_name_announced) + { + p->last_state_name_announced = name; + PD(p, "State changed to %s", proto_state_name(p)); + } + } + else + p->last_state_name_announced = NULL; rem_node(&p->n); switch (p->core_state) { |