summaryrefslogtreecommitdiff
path: root/apps/app_directory.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2007-07-20 18:44:30 +0000
committerMark Michelson <mmichelson@digium.com>2007-07-20 18:44:30 +0000
commit51bf7143199a7cab599edeb9d73ed388c8efef47 (patch)
treedf6938c2930500175315dc5c88b6add054017a38 /apps/app_directory.c
parentd5b4fde291a74f8004f45cb90f6307e849181684 (diff)
Merged revisions 76139 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76139 | mmichelson | 2007-07-20 13:42:27 -0500 (Fri, 20 Jul 2007) | 6 lines When using users.conf for the entries in the directory, if multiple users had the same last name, only the first user listed would be available in the directory. (closes issue #10200, reported by mrskippy, patched by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_directory.c')
-rw-r--r--apps/app_directory.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 72f777763..2b6b806e1 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -404,6 +404,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, struct
int lastuserchoice = 0;
char *start, *conv, *stringp = NULL;
const char *pos;
+ int breakout = 0;
if (ast_strlen_zero(context)) {
ast_log(LOG_WARNING,
@@ -527,6 +528,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, struct
* user hungup
*/
lastuserchoice = 0;
+ breakout = 1;
break;
case '1':
/* user pressed '1' and extensions exists;
@@ -534,19 +536,23 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, struct
a goto() on the channel
*/
lastuserchoice = res;
+ breakout = 1;
break;
case '*':
/* user pressed '*' to skip something found */
lastuserchoice = res;
+ breakout = 0;
res = 0;
break;
default:
+ breakout = 1;
break;
}
ast_free(conv);
- break;
- }
- ast_free(conv);
+ if (breakout)
+ break;
+ } else
+ ast_free(conv);
}
}
}