summaryrefslogtreecommitdiff
path: root/apps/app_directory.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_directory.c')
-rw-r--r--apps/app_directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 4db404cff..52e8722c2 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -824,7 +824,7 @@ static int directory_exec(struct ast_channel *chan, const char *data)
}
digits[7] = digit + '0';
- if (chan->_state != AST_STATE_UP) {
+ if (ast_channel_state(chan) != AST_STATE_UP) {
if (!ast_test_flag(&flags, OPT_NOANSWER)) {
/* Otherwise answer unless we're supposed to read while on-hook */
res = ast_answer(chan);