summaryrefslogtreecommitdiff
path: root/funcs/func_dialgroup.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-12-16 08:56:59 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-12-16 08:56:59 +0000
commitac77932bac05c658250a593fc29220263bd54376 (patch)
treedfff34128d2616c3252142b7657baa4b19933a5b /funcs/func_dialgroup.c
parente0c1aed520eb6360c22c630d3211e5b9916f2aad (diff)
Merged revisions 298478 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r298478 | tilghman | 2010-12-16 02:56:13 -0600 (Thu, 16 Dec 2010) | 15 lines Merged revisions 298477 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r298477 | tilghman | 2010-12-16 02:54:23 -0600 (Thu, 16 Dec 2010) | 8 lines Eliminate duplicates from container. (closes issue #18091) Reported by: bunny Patches: 20101006__issue18091.diff.txt uploaded by tilghman (license 14) Tested by: bunny ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@298479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_dialgroup.c')
-rw-r--r--funcs/func_dialgroup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/funcs/func_dialgroup.c b/funcs/func_dialgroup.c
index 467bc87fa..b1fa78017 100644
--- a/funcs/func_dialgroup.c
+++ b/funcs/func_dialgroup.c
@@ -236,6 +236,11 @@ static int dialgroup_write(struct ast_channel *chan, const char *cmd, char *data
if (strcasecmp(args.op, "add") == 0) {
for (j = 0; j < inter.argc; j++) {
+ /* Eliminate duplicates */
+ if ((entry = ao2_find(grhead->entries, inter.faces[j], 0))) {
+ ao2_ref(entry, -1);
+ continue;
+ }
if ((entry = ao2_alloc(sizeof(*entry), NULL))) {
ast_copy_string(entry->name, inter.faces[j], sizeof(entry->name));
ao2_link(grhead->entries, entry);