<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>You can relocate those functions and related code in one of the
pv*.{c,h} in the core.<br>
</p>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 28/04/16 11:00, Jason Penton wrote:<br>
</div>
<blockquote
cite="mid:CALoGXNU4zzvMMAnfAGmMtKMw=rdygGAEa8Lh7_1M4NDQokzUpQ@mail.gmail.com"
type="cite">
<div dir="ltr">Does anybody know if there is an existing library
function/s to copy a sip_msg (typically request) from shm to
pkg? I know there is already this functionality in the tmx
module but I think it would be useful to move this into a
library so it can be used by other modules? I am just wanting to
make sure before I replicate code...
<div><br>
</div>
<div><b>Reason for such functionality:</b></div>
<div><br>
</div>
<div>The main reason is where modules need to access specific
headers from a sip request which they get from
t->uas.request (generally in instances where only the rpl
message is accessible). We all know that t->uas.request
sits in SHM, so if any additional parsing is done on this
message it's pointers will be polluted with pvt memory
addresses of the processing parsing the request. This could
ultimately lead to memory corruption and segfaults.</div>
<div><br>
</div>
<div>I would therefore propose moving the pv_t_copy_msg and
associated functions from tmx modules into the core library...
any objections?</div>
<div><br>
</div>
<div>Cheers</div>
<div>Jason </div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<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, Berlin, May 18-20, 2016 - <a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
</body>
</html>