diff options
-rw-r--r-- | client_list.c | 6 | ||||
-rw-r--r-- | client_list.h | 6 | ||||
-rw-r--r-- | openwrt/rhctl/Makefile | 3 | ||||
-rw-r--r-- | switchctl.c | 20 |
4 files changed, 28 insertions, 7 deletions
diff --git a/client_list.c b/client_list.c index b3be116..4ee2559 100644 --- a/client_list.c +++ b/client_list.c @@ -47,8 +47,12 @@ int client_add(client_t** first, int fd) new_client->fd = fd; new_client->type = DEFAULT; - new_client->status_listener = 0; new_client->request_listener = 0; + new_client->status_listener = 0; + new_client->gpi_listener = 0; + new_client->oc_listener = 0; + new_client->relay_listener = 0; + new_client->silence_listener = 0; new_client->next = NULL; new_client->buffer.offset = 0; diff --git a/client_list.h b/client_list.h index ba888ae..00d741d 100644 --- a/client_list.h +++ b/client_list.h @@ -30,8 +30,12 @@ typedef enum client_type_enum client_type_t; struct client_struct { int fd; client_type_t type; - int status_listener; int request_listener; + int status_listener; + int gpi_listener; + int oc_listener; + int relay_listener; + int silence_listener; struct client_struct* next; read_buffer_t buffer; }; diff --git a/openwrt/rhctl/Makefile b/openwrt/rhctl/Makefile index cc2acac..0fe6fb9 100644 --- a/openwrt/rhctl/Makefile +++ b/openwrt/rhctl/Makefile @@ -18,7 +18,8 @@ PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://localhost/ -PKG_MD5SUM:=d406052350d01799bcf69ea2c575a436 +PKG_MD5SUM:=885cb8a68c2e2a61909ae6a9f976af50 + PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install diff --git a/switchctl.c b/switchctl.c index adb0682..ba81c46 100644 --- a/switchctl.c +++ b/switchctl.c @@ -409,14 +409,26 @@ void process_cmd_listen(const char* param, int fd, client_t* client_lst) client_t* listener = client_find(client_lst, fd); if(listener) { if(!param) { - listener->status_listener = 1; listener->request_listener = 1; + listener->status_listener = 1; + listener->gpi_listener = 1; + listener->oc_listener = 1; + listener->relay_listener = 1; + listener->silence_listener = 1; } else { - if(!strncmp(param, "status", 6)) - listener->status_listener = 1; - else if(!strncmp(param, "request", 7)) + if(!strncmp(param, "request", 7)) listener->request_listener = 1; + else if(!strncmp(param, "status", 6)) + listener->status_listener = 1; + else if(!strncmp(param, "gpi", 3)) + listener->gpi_listener = 1; + else if(!strncmp(param, "oc", 2)) + listener->oc_listener = 1; + else if(!strncmp(param, "relay", 5)) + listener->relay_listener = 1; + else if(!strncmp(param, "silence", 7)) + listener->silence_listener = 1; else if(!strncmp(param, "none", 4)) { listener->request_listener = 0; listener->status_listener = 0; |