<div dir="ltr">Thank you very much for this. <div><br></div><div style>One question regarding $sht. Does it need locking like $shv does?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 14, 2013 at 8:35 AM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</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>
    $shv(...) is referred as shared memory variable because it stores
    the value in shared memory. That means if you set $shv(x) in one
    process, you can read its value from another process. You have to be
    sure you don&#39;t have races in setting the variable, that could be
    achieved with locks from cfgutils.<br>
    <br>
    $var(...) is referred as private memory variable because it stores
    the value in private memory. That means its value is valid in the
    context of the same process (e.g., use it while processing the same
    sip message on a single routing block type, like running the main
    request route block, or reply route block, etc). It is not safe to
    use it for transactions, like setting it in request route block and
    reading it in failure route block (use avps for that case).<br>
    <br>
    $var(...) is faster to use and does not need locking at all. These
    are usually referred as script variable, but this term can be
    confused with all the config file variables.<br>
    <br>
    Cheers,<br>
    Daniel<div><div class="h5"><br>
    <br>
    <div>On 2/12/13 3:13 PM, Mino Haluz wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi,</span>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">what is
          the difference between shared and script variable ? Thanks</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">Mino</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a href="http://conference.kamailio.com" target="_blank">http://conference.kamailio.com</a> -</pre>
  </font></span></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>