From 4ad11db8c58192cbff042dd393ecf949895f1cef Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 20 Mar 2014 19:12:23 +0000 Subject: added client type for heartbeat master and standby diff --git a/client_list.h b/client_list.h index 1be6bb3..d208262 100644 --- a/client_list.h +++ b/client_list.h @@ -24,7 +24,7 @@ #include "datatypes.h" -enum client_type_enum { DEFAULT, MASTER, STANDBY, HEARTBEAT }; +enum client_type_enum { DEFAULT, MASTER, STANDBY, MASTER_HB, STANDBY_HB }; typedef enum client_type_enum client_type_t; struct client_struct { diff --git a/switchctl.c b/switchctl.c index f193450..4d4b003 100644 --- a/switchctl.c +++ b/switchctl.c @@ -356,8 +356,10 @@ void process_cmd_type(const char* param, int fd, client_t* client_lst) client->type = STANDBY; client->gpi_listener = 1; } - else if(!strncmp(param, "heartbeat", 9)) - client->type = HEARTBEAT; + else if(!strncmp(param, "master_hb", 9)) + client->type = MASTER_HB; + else if(!strncmp(param, "standby_hb", 10)) + client->type = STANDBY_HB; else { log_printf(DEBUG, "unkown client type '%s'", param); send_response(fd, "EEE: type: unknown client type"); -- cgit v0.10.2