From 62de701abbe295210c1c2eed6232e03c2fb8567f Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Mon, 9 Apr 2007 17:22:15 +0000 Subject: [PATCH] Allow matching on names shorter than 3 chars. This also fixes the case where somebody wants to match on less then 3 chars. Issue 9071 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60935 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app_directory.c b/apps/app_directory.c index 2b1d4e9677..c2764a2229 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -470,7 +470,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char * pos = strrchr(pos, ' ') + 1; conv = convert(pos); if (conv) { - if (!strcmp(conv, ext)) { + if (!strncmp(conv, ext, strlen(ext))) { /* Match! */ found++; free(conv);