]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 60935 via svnmerge from
authorJason Parker <jparker@digium.com>
Mon, 9 Apr 2007 17:22:59 +0000 (17:22 +0000)
committerJason Parker <jparker@digium.com>
Mon, 9 Apr 2007 17:22:59 +0000 (17:22 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r60935 | qwell | 2007-04-09 12:22:15 -0500 (Mon, 09 Apr 2007) | 5 lines

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.4@60936 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_directory.c

index a179a82738ef26026ffc58334b4de51eda3ccec6..464adcd85614b47a8dfbb43734293d64b6a23755 100644 (file)
@@ -460,7 +460,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, struct
                                                        pos = strrchr(pos, ' ') + 1;
                                                conv = convert(pos);
                                                if (conv) {
-                                                       if (!strcmp(conv, ext)) {
+                                                       if (!strncmp(conv, ext, strlen(ext))) {
                                                                /* Match! */
                                                                found++;
                                                                free(conv);