aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-16 08:56:13 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-16 08:56:13 +0000
commit43d4c65fcc086fc4431ffe388a60435d5d7f7e0d (patch)
tree8a292ed94854bb4f92a105269d849b5e6d8da744 /funcs
parent36b00ceb5e27c965bbdf18cb827e34ec480cdeeb (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.8@298478 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-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);