diff options
author | Kozlov Dmitry <dima@server> | 2010-11-11 17:10:19 +0300 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-11-11 17:10:19 +0300 |
commit | 8f5464b34e85d68c26e4cff16dfba2c00cf53adc (patch) | |
tree | b62e30de01e125a2d26cb801eec8f6f4a0b3182d /accel-pptpd/cli/cli.c | |
parent | 734a3d3e93271cbde8584b303a5e2d7afab70016 (diff) | |
download | accel-ppp-8f5464b34e85d68c26e4cff16dfba2c00cf53adc.tar.gz accel-ppp-8f5464b34e85d68c26e4cff16dfba2c00cf53adc.zip |
pppoe: implemented additional cli commands
Diffstat (limited to 'accel-pptpd/cli/cli.c')
-rw-r--r-- | accel-pptpd/cli/cli.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/accel-pptpd/cli/cli.c b/accel-pptpd/cli/cli.c index 06360c5c..c109862d 100644 --- a/accel-pptpd/cli/cli.c +++ b/accel-pptpd/cli/cli.c @@ -11,6 +11,7 @@ #define MAX_CMD_ITEMS 100 #define MSG_SYNTAX_ERROR "syntax error\r\n" +#define MSG_INVAL_ERROR "invalid argument\r\n" #define MSG_UNKNOWN_CMD "command unknown\r\n" static LIST_HEAD(simple_cmd_list); @@ -156,8 +157,10 @@ int process_cmd(struct client_t *cln) case CLI_CMD_FAILED: return -1; case CLI_CMD_SYNTAX: - if (telnet_send(cln, MSG_SYNTAX_ERROR, sizeof(MSG_SYNTAX_ERROR))) - return -1; + telnet_send(cln, MSG_SYNTAX_ERROR, sizeof(MSG_SYNTAX_ERROR)); + return 0; + case CLI_CMD_INVAL: + telnet_send(cln, MSG_INVAL_ERROR, sizeof(MSG_INVAL_ERROR)); return 0; case CLI_CMD_OK: found = 1; |