summaryrefslogtreecommitdiff
path: root/client_list.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2014-03-20 21:06:14 (GMT)
committerChristian Pointner <equinox@helsinki.at>2014-03-20 21:06:14 (GMT)
commit16842a01fa7785f240677687a2212ed575b384e2 (patch)
treea1cda7284986a0ec54bd39b88bfeb155c9eac043 /client_list.c
parent25a74bf11ccd8c90d365038e80e57c9a621569df (diff)
allow type setting only once
Diffstat (limited to 'client_list.c')
-rw-r--r--client_list.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/client_list.c b/client_list.c
index 51c50fa..92f7b91 100644
--- a/client_list.c
+++ b/client_list.c
@@ -25,6 +25,19 @@
#include "client_list.h"
#include "datatypes.h"
+char* client_type_tostring(client_type_t type)
+{
+ switch(type)
+ {
+ case MASTER: return "master";
+ case STANDBY: return "standby";
+ case MASTER_HB: return "master_hb";
+ case STANDBY_HB: return "standby_hb";
+ case DEFAULT: return "unspecified";
+ }
+ return "<invalid>";
+}
+
client_t* client_get_last(client_t* first)
{
if(!first)