summaryrefslogtreecommitdiff
path: root/apps/app_directory.c
diff options
context:
space:
mode:
authorJames Golovich <james@gnuinter.net>2004-05-09 07:51:44 +0000
committerJames Golovich <james@gnuinter.net>2004-05-09 07:51:44 +0000
commit8ef3b1544be0ac8bfcb77f297c2eff8a6f8b3aec (patch)
treee02913e8cd2ec7f6236ac862e98d11dc9fd199ce /apps/app_directory.c
parent3e3642433bbd87d363394bdf8341a6047f1a9eae (diff)
More ast_strlen_zero changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_directory.c')
-rwxr-xr-xapps/app_directory.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 8f0de9236..b267559ba 100755
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -19,6 +19,7 @@
#include <asterisk/module.h>
#include <asterisk/config.h>
#include <asterisk/say.h>
+#include <asterisk/utils.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
@@ -132,7 +133,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
char *start, *pos, *conv,*stringp=NULL;
char fn[256];
char fn2[256];
- if (!context || !strlen(context)) {
+ if (!context || ast_strlen_zero(context)) {
ast_log(LOG_WARNING, "Directory must be called with an argument (context in which to interpret extensions)\n");
return -1;
}
@@ -190,7 +191,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
} else {
- res = ast_say_character_str(chan, strlen(name) ? name : v->name, AST_DIGIT_ANY, chan->language);
+ res = ast_say_character_str(chan, !ast_strlen_zero(name) ? name : v->name, AST_DIGIT_ANY, chan->language);
}
ahem:
if (!res)
@@ -260,9 +261,9 @@ top:
} else
dialcontext = context;
dirintro = ast_variable_retrieve(cfg, context, "directoryintro");
- if (!dirintro || !strlen(dirintro))
+ if (!dirintro || ast_strlen_zero(dirintro))
dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
- if (!dirintro || !strlen(dirintro))
+ if (!dirintro || ast_strlen_zero(dirintro))
dirintro = "dir-intro";
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);