strlen fixes and don't destroy SIP channels that still have pending things on them (bug #1552 et al)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-05-04 19:11:25 +00:00
parent fdec9012eb
commit 19a080ddd7
5 changed files with 24 additions and 18 deletions

View File

@@ -36,6 +36,7 @@
#include <asterisk/app.h>
#include <asterisk/dsp.h>
#include <asterisk/musiconhold.h>
#include <asterisk/utils.h>
#include "../asterisk.h"
#include "../astconf.h"
@@ -1465,7 +1466,7 @@ static int agi_exec_full(struct ast_channel *chan, void *data, int enhanced, int
int pid;
char *stringp;
AGI agi;
if (!data || !strlen(data)) {
if (!data || ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "AGI requires an argument (script)\n");
return -1;
}