ast_strlen_zero changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
James Golovich
2004-05-08 08:07:47 +00:00
parent 0ce20fea8a
commit 29718a5001
4 changed files with 13 additions and 9 deletions

View File

@@ -25,6 +25,7 @@
#include <asterisk/options.h>
#include <asterisk/cli.h>
#include <asterisk/say.h>
#include <asterisk/utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
@@ -246,7 +247,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
int confno = 0;
char confstr[80];
if (data && strlen(data)) {
if (data && !ast_strlen_zero(data)) {
if ((sscanf(data, "Zap/%d", &confno) != 1) &&
(sscanf(data, "%d", &confno) != 1)) {
ast_log(LOG_WARNING, "ZapBarge Argument (if specified) must be a channel number, not '%s'\n", (char *)data);