<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 15/10/14 20:36, Charles Chance
wrote:<br>
</div>
<blockquote
cite="mid:CAOvxgzAY3urO8uzxmetGOn5eew=v+p-6_S=wBSEXGPfmrWZBOw@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Daniel,<br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 15 October 2014 14:51,
Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:miconda@gmail.com"
target="_blank">miconda@gmail.com</a>></span> wrote:<br>
<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>
one thing I wanted to add -- it may be good to backup
the old value of the sock and restore it later.<br>
<br>
</div>
</blockquote>
<div><br>
</div>
<div>Thanks - I had that in mind already.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> I am not sure if
this is used in a context of a request that is going to
be forwarded as well to some other address. If yes, then
perhaps is it safer to backup and restore initial socket
value.<br>
<br>
Perhaps it needs to check if the transaction exists and
if not, create it first via tm api, then set the new
socket for message and call the t_replicate function,
not to get the dmq server socket in tm.<br>
<br>
</div>
</blockquote>
<div><br>
</div>
<div>Sorry, I don't fully understand the last part?</div>
</div>
</div>
</div>
</blockquote>
t_replicate() create the transaction for the respective requests (if
the transaction doesn't exist already). Creation of the transaction
involves cloning to shared memory the sip_msg_t structure. If you
update the forced socket to dmq server address for the request, it
gets in shared memory with the new value, which may be wrong for
further processing of the message in branch/failure routes.<br>
<br>
My suggestion is to check if transaction exists and if not, first
create it and then backup socket, update it for dmq address, do the
replication and restore the socket from backup (note that the dmq
the function will still use the sip_msg_t from private memory even
after creating the transaction).<br>
<br>
Cheers,<br>
Daniel<br>
<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></pre>
</body>
</html>