diff options
author | Christian Pointner <equinox@helsinki.at> | 2009-11-10 15:29:56 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2009-11-10 15:29:56 (GMT) |
commit | 6b7dbe7b1c23984b662c02c23205e38d224a5fd4 (patch) | |
tree | 9e2f61621ecda2e85a301ca6a5e916f9629d7387 | |
parent | 225719caa5079685c7baad3c878002e9fcc704b5 (diff) |
added add and rm commands
-rw-r--r-- | switchctl.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/switchctl.c b/switchctl.c index 6e2ef08..dcf417c 100644 --- a/switchctl.c +++ b/switchctl.c @@ -124,6 +124,16 @@ int process_cmd_request(const char* cmd, cmd_id_t cmd_id, const char* param, int ch_name = &(param[4]); ch_nr = &(cmd_param[2]); } + else if(!strncmp(param, "add ", 4)) { + cmd_param = strdup("*0ii3"); + ch_name = &(param[4]); + ch_nr = &(cmd_param[2]); + } + else if(!strncmp(param, "rm ", 3)) { + cmd_param = strdup("*0ii5"); + ch_name = &(param[3]); + ch_nr = &(cmd_param[2]); + } else if(!strncmp(param, "on2 ", 4)) { cmd_param = strdup("*0ii2"); ch_name = &(param[4]); @@ -131,6 +141,16 @@ int process_cmd_request(const char* cmd, cmd_id_t cmd_id, const char* param, int } else if(!strncmp(param, "off2 ", 5)) { cmd_param = strdup("*0iiM2"); + ch_name = &(param[5]); + ch_nr = &(cmd_param[2]); + } + else if(!strncmp(param, "add2 ", 5)) { + cmd_param = strdup("*0ii4"); + ch_name = &(param[5]); + ch_nr = &(cmd_param[2]); + } + else if(!strncmp(param, "rm2 ", 4)) { + cmd_param = strdup("*0ii6"); ch_name = &(param[4]); ch_nr = &(cmd_param[2]); } |