From ba597da72e8a548403f2a86cbe864f6f8c087397 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 25 Jul 2008 17:20:40 +0000 Subject: Environment variables in configuration file. --- cmd-command-prompt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cmd-command-prompt.c') diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index c156002a..d0bc5d9e 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -1,4 +1,4 @@ -/* $Id: cmd-command-prompt.c,v 1.4 2008-06-25 20:43:13 nicm Exp $ */ +/* $Id: cmd-command-prompt.c,v 1.5 2008-07-25 17:20:40 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -72,7 +72,7 @@ cmd_command_prompt_callback(void *data, char *s) if (s == NULL) return; - if ((cmd = cmd_string_parse(s, &cause)) == NULL) { + if (cmd_string_parse(s, &cmd, &cause) != 0) { if (cause == NULL) return; *cause = toupper((u_char) *cause); @@ -80,6 +80,8 @@ cmd_command_prompt_callback(void *data, char *s) xfree(cause); return; } + if (cmd == NULL) + return; ctx.msgdata = NULL; ctx.cursession = c->session; -- cgit