summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-04 17:59:58 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-04 17:59:58 (GMT)
commit148eb9ed5edf34b0090f86893b30be5dbb37e05e (patch)
tree55d06cc6859a5afd1d30600a2d6a56ac962f015b
parent7882d05127816e6885268182a3769bc7a091de94 (diff)
added client type
-rw-r--r--client_list.c1
-rw-r--r--client_list.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/client_list.c b/client_list.c
index 6d2f838..5f26f60 100644
--- a/client_list.c
+++ b/client_list.c
@@ -46,6 +46,7 @@ int client_add(client_t** first, int fd)
return -2;
new_client->fd = fd;
+ new_client->type = DEFAULT;
new_client->status_listener = 0;
new_client->error_listener = 0;
new_client->request_listener = 0;
diff --git a/client_list.h b/client_list.h
index c12d2b8..d54a853 100644
--- a/client_list.h
+++ b/client_list.h
@@ -24,8 +24,12 @@
#include "datatypes.h"
+enum client_type_enum { DEFAULT, MASTER, STANDBY };
+typedef enum client_type_enum client_type_t;
+
struct client_struct {
int fd;
+ client_type_t type;
int status_listener;
int error_listener;
int request_listener;