From 564ff4b83b16ad21933a4c00be3bab84c8534449 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 19 Nov 2009 06:14:03 +0000 Subject: print new mode message only when mode actually changed 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; } -- cgit v0.10.2