[sr-dev] DMQ: seems broken logic

Charles Chance charles.chance at sipcentric.com
Tue Oct 14 00:04:00 CEST 2014


Hi Victor,

Have not had chance to test but can you try with the following small patch
(against master):

diff --git a/modules/dmq/dmq_funcs.c b/modules/dmq/dmq_funcs.c
index 3c9c8c3..331591f 100644
--- a/modules/dmq/dmq_funcs.c
+++ b/modules/dmq/dmq_funcs.c
@@ -370,6 +370,7 @@ error:
 int cfg_dmq_t_replicate(struct sip_msg* msg, char* s)
 {
        dmq_node_t* node;
+       struct socket_info* sock;
        int i = 0;

        /* avoid loops - do not replicate if message has come from another
node
@@ -381,6 +382,11 @@ int cfg_dmq_t_replicate(struct sip_msg* msg, char* s)
                return -1;
        }

+       sock = lookup_local_socket(&dmq_server_socket);
+       if (sock) {
+               set_force_socket(msg, sock);
+       }
+
        lock_get(&node_list->lock);
        node = node_list->nodes;
        while(node) {



Cheers,

Charles


On 13 October 2014 14:05, Victor V. Kustov <coyote at bks.tv> wrote:

> Hi, Charles
>
> Main problem - usage t_replicate from TM module. All TM funcs operate
> with main kamailio interface and socket, but DMQ interfaces and sockets
> needed.
>
>
> --
>  WBR, Victor
>   JID: coyote at bks.tv
>   JID: coyote at bryansktel.ru
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>

-- 
www.sipcentric.com

Follow us on twitter @sipcentric <http://twitter.com/sipcentric>

Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20141013/021d442a/attachment-0001.html>


More information about the sr-dev mailing list