aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directory.c
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-09 07:51:44 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-09 07:51:44 +0000
commit9bd61aa747cedeb161b46ca536312d8e569bfbf5 (patch)
treee02913e8cd2ec7f6236ac862e98d11dc9fd199ce /apps/app_directory.c
parent7bfd090538d068ea86150b0a7a27d5b2bda1df39 (diff)
More ast_strlen_zero changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2930 f38db490-d61c-443f-a65b-d21fe96a405b
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);