]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Allow matching on names shorter than 3 chars.
authorJason Parker <jparker@digium.com>
Mon, 9 Apr 2007 17:22:15 +0000 (17:22 +0000)
committerJason Parker <jparker@digium.com>
Mon, 9 Apr 2007 17:22:15 +0000 (17:22 +0000)
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

index 2b1d4e9677f02805f284417b8d2bd8b70aea7299..c2764a2229bd2b2b4a02ed4d7ee218aeff9396b6 100644 (file)
@@ -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);