summaryrefslogtreecommitdiff
path: root/switchctl.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-19 06:14:03 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-19 06:14:03 (GMT)
commit564ff4b83b16ad21933a4c00be3bab84c8534449 (patch)
tree1946316b47a701c646edb168d18e6177afd3e8c6 /switchctl.c
parentc209cfd639221d56e63b27db3f2efbf10e3a7bae (diff)
print new mode message only when mode actually changed
Diffstat (limited to 'switchctl.c')
-rw-r--r--switchctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/switchctl.c b/switchctl.c
index ce32195..adb0682 100644
--- a/switchctl.c
+++ b/switchctl.c
@@ -398,7 +398,8 @@ int process_cmd_mode(const char* param, int fd, cmd_t **cmd_q, options_t* opt)
send_response(fd, "EEE: mode: missing parameter");
}
- log_printf(NOTICE, "new mode: %s", opt->mode_ == MODE_MASTER ? "master" : "standby");
+ if(old_mode != opt->mode_)
+ log_printf(NOTICE, "new mode: %s", opt->mode_ == MODE_MASTER ? "master" : "standby");
return 0;
}