<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
so how is the full code for this case, first you change the r-uri
and then call append_branch()?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 05/02/15 11:46, Charles Chance
wrote:<br>
</div>
<blockquote
cite="mid:CAOvxgzAuE1vpN_dtLmJjYM0mw8MMUUv_MqadxEosExCaRKCLJg@mail.gmail.com"
type="cite">
<p dir="ltr">Hi Daniel,</p>
<p dir="ltr">I believe this is expected, since we are simply
replicating the original message to other (multiple, hence the
additional branches) nodes so they have a copy. Should we in
fact change the r-uri in this case? I'm not sure. It all seems
to test ok.</p>
<p dir="ltr">All the best,</p>
<p dir="ltr">Charles<br>
</p>
<div class="gmail_quote">On 5 Feb 2015 09:41, "Daniel-Constantin
Mierla" <<a moz-do-not-send="true"
href="mailto:miconda@gmail.com">miconda@gmail.com</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
<br>
haven't looked at the whole function, but what you are using
now is adding the r-uri as a branch. Do you want that? At
the end it might be that the r-ruri and the last branch have
the same address.<br>
<br>
You can look inside registrar module at lookup() function to
see how first location record is added as r-uri and the rest
as branches.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div>On 04/02/15 13:29, Charles Chance wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi All,
<div><br>
</div>
<div>Can anyone confirm, is this safe? Primary use case
is replication of REGISTER after local save().</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>diff --git a/modules/dmq/dmq_funcs.c
b/modules/dmq/dmq_funcs.c</div>
<div>index b31deba..a3611e8 100644</div>
<div>--- a/modules/dmq/dmq_funcs.c</div>
<div>+++ b/modules/dmq/dmq_funcs.c</div>
<div>@@ -24,6 +24,7 @@</div>
<div> </div>
<div> #include "dmq_funcs.h"</div>
<div> #include "notification_peer.h"</div>
<div>+#include "../../dset.h"</div>
<div> </div>
<div> /**</div>
<div> * @brief register a DMQ peer</div>
<div>@@ -385,6 +386,7 @@ int
cfg_dmq_t_replicate(struct sip_msg* msg, char* s)</div>
<div> dmq_node_t* node;</div>
<div> struct socket_info* sock;</div>
<div> int i = 0;</div>
<div>+ int first = 1;</div>
<div> </div>
<div> /* avoid loops - do not replicate if
message has come from another node</div>
<div> * (override if optional parameter is
set)</div>
<div>@@ -413,10 +415,22 @@ int
cfg_dmq_t_replicate(struct sip_msg* msg, char* s)</div>
<div> node = node->next;</div>
<div> continue;</div>
<div> }</div>
<div>+</div>
<div>+ if (!first) {</div>
<div>+ if (append_branch(msg, 0,
0, 0, Q_UNSPECIFIED, 0, sock, 0, 0, 0, 0) == -1) {</div>
<div>+ LM_ERR("failed to
append a branch\n");</div>
<div>+ node =
node->next;</div>
<div>+ continue;</div>
<div>+ }</div>
<div>+ } else {</div>
<div>+ first = 0;</div>
<div>+ }</div>
<div>+</div>
<div> if(tmb.t_replicate(msg,
&node->orig_uri) < 0) {</div>
<div> LM_ERR("error calling
t_replicate\n");</div>
<div> goto error;</div>
<div> }</div>
<div>+</div>
<div> node = node->next;</div>
<div> }</div>
<div> lock_release(&node_list->lock);</div>
<div><br>
</div>
<div><br>
</div>
<div>Many thanks,</div>
<div><br>
</div>
<div>Charles</div>
<div><br>
</div>
</div>
</div>
<br>
<font face="Helvetica, Arial, sans-serif"><font><span
style="font-size:10pt"><a moz-do-not-send="true"
href="http://www.sipcentric.com/"
title="blocked::http://www.sipcentric.com/"
target="_blank">www.sipcentric.com</a><br>
<br>
Follow us on twitter <a moz-do-not-send="true"
href="http://twitter.com/sipcentric"
title="blocked::http://twitter.com/sipcentric"
target="_blank">@sipcentric</a><br>
<br>
<font color="gray">Sipcentric Ltd. Company
registered in England & Wales no. 7365592.</font> <font
color="gray">Registered office: Faraday Wharf,
Innovation Birmingham Campus, Holt Street,
Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - <a moz-do-not-send="true" href="http://www.kamailioworld.com" target="_blank">http://www.kamailioworld.com</a></pre>
</div>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br>
</blockquote>
</div>
<br>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span
style="font-size:10pt"><a moz-do-not-send="true"
href="http://www.sipcentric.com/"
title="blocked::http://www.sipcentric.com/"
target="_blank">www.sipcentric.com</a><br>
<br>
Follow us on twitter <a moz-do-not-send="true"
href="http://twitter.com/sipcentric"
title="blocked::http://twitter.com/sipcentric"
target="_blank">@sipcentric</a><br>
<br>
<font color="gray">Sipcentric Ltd. Company registered in
England & Wales no. 7365592.</font> <font color="gray">Registered
office: Faraday Wharf, Innovation Birmingham Campus, Holt
Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - <a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
</body>
</html>