I found this sillyness when I did my ast_module_user conversion. Return immediately if no data was passed to the Verbose application.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-07-16 15:57:01 +00:00
parent b8cd949cce
commit 0dc98ebdf2

View File

@@ -54,11 +54,12 @@ static char *log_descrip =
static int verbose_exec(struct ast_channel *chan, void *data) static int verbose_exec(struct ast_channel *chan, void *data)
{ {
char *vtext; char *vtext, *tmp;
int vsize; int vsize;
if (data) { if (ast_strlen_zero(data))
char *tmp; return 0;
vtext = ast_strdupa(data); vtext = ast_strdupa(data);
tmp = strsep(&vtext, "|"); tmp = strsep(&vtext, "|");
if (vtext) { if (vtext) {
@@ -88,7 +89,6 @@ static int verbose_exec(struct ast_channel *chan, void *data)
ast_verbose(VERBOSE_PREFIX_4 "%s\n", vtext); ast_verbose(VERBOSE_PREFIX_4 "%s\n", vtext);
} }
} }
}
return 0; return 0;
} }