version 1.43, 2016/04/29 17:12:12 |
version 1.44, 2016/10/09 08:06:51 |
|
|
}; |
}; |
|
|
struct cmd_if_shell_data { |
struct cmd_if_shell_data { |
|
char *file; |
|
u_int line; |
|
|
char *cmd_if; |
char *cmd_if; |
char *cmd_else; |
char *cmd_else; |
|
|
|
|
return (CMD_RETURN_NORMAL); |
return (CMD_RETURN_NORMAL); |
} |
} |
|
|
cdata = xmalloc(sizeof *cdata); |
cdata = xcalloc(1, sizeof *cdata); |
|
if (self->file != NULL) { |
|
cdata->file = xstrdup(self->file); |
|
cdata->line = self->line; |
|
} |
|
|
cdata->cmd_if = xstrdup(args->argv[1]); |
cdata->cmd_if = xstrdup(args->argv[1]); |
if (args->argc == 3) |
if (args->argc == 3) |
|
|
if (cmd == NULL) |
if (cmd == NULL) |
return; |
return; |
|
|
if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) { |
if (cmd_string_parse(cmd, &cmdlist, cdata->file, cdata->line, |
|
&cause) != 0) { |
if (cause != NULL) { |
if (cause != NULL) { |
cmdq_error(cmdq, "%s", cause); |
cmdq_error(cmdq, "%s", cause); |
free(cause); |
free(cause); |
|
|
|
|
free(cdata->cmd_else); |
free(cdata->cmd_else); |
free(cdata->cmd_if); |
free(cdata->cmd_if); |
|
|
|
free(cdata->file); |
free(cdata); |
free(cdata); |
} |
} |
|
|
|
|
|
|
free(cdata->cmd_else); |
free(cdata->cmd_else); |
free(cdata->cmd_if); |
free(cdata->cmd_if); |
|
|
|
free(cdata->file); |
free(cdata); |
free(cdata); |
} |
} |