summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--switchctl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/switchctl.c b/switchctl.c
index 9bf0612..83ea464 100644
--- a/switchctl.c
+++ b/switchctl.c
@@ -132,6 +132,12 @@ int process_cmd(const char* cmd, int fd, cmd_t **cmd_q, client_t* client_lst, op
if(ret)
return ret;
+ if(cmd_id == STATUS) {
+ char buf[30];
+ snprintf(buf, 30, "Current Mode: %s", opt->mode_ == MODE_MASTER ? "Master" : "Standby");
+ send_response(fd, buf);
+ }
+
log_printf(NOTICE, "command: %s", cmd);
break;
}