Module: kamailio Branch: master Commit: 8e955bad80bbc8d05ed71dca00f51dbad684f1ae URL: https://github.com/kamailio/kamailio/commit/8e955bad80bbc8d05ed71dca00f51dba...
Author: Charles Chance charles.chance@sipcentric.com Committer: Charles Chance charles.chance@sipcentric.com Date: 2015-04-21T22:22:58+01:00
dmq: check for duplicate nodes when multi_notify enabled
- also avoids adding self if we are one of the resolved IPs
---
Modified: modules/dmq/notification_peer.c
---
Diff: https://github.com/kamailio/kamailio/commit/8e955bad80bbc8d05ed71dca00f51dba... Patch: https://github.com/kamailio/kamailio/commit/8e955bad80bbc8d05ed71dca00f51dba...
---
diff --git a/modules/dmq/notification_peer.c b/modules/dmq/notification_peer.c index 416b6e1..3abefde 100644 --- a/modules/dmq/notification_peer.c +++ b/modules/dmq/notification_peer.c @@ -315,9 +315,11 @@ dmq_node_t* add_server_and_notify(str *paddr) for (index = 0; index < host_cnt; index++) { pstr->s = puri_list [index]; pstr->len = strlen (puri_list [index]); - pnode = add_dmq_node (node_list, pstr); - if (pnode && !pfirst) - { pfirst = pnode; } + if (!find_dmq_node_uri(node_list, pstr)) { // check for duplicates + pnode = add_dmq_node (node_list, pstr); + if (pnode && !pfirst) + { pfirst = pnode; } + } } }