<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    actually is not completely yet -- I set the realm prefix parameter
    and got another crash. But at least should work when prefix is not
    set :-)<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 6/11/12 2:36 PM, Jason Penton wrote:<br>
    </div>
    <blockquote
cite="mid:CALoGXNWP+kPJs_2w-zkZ4awznN=xWWrfeRdP48jS7oox-i99SQ@mail.gmail.com"
      type="cite">Great find Daniel,
      <div><br>
      </div>
      <div>lol, must be a sparc issue - we are running x86 and haven't
        come across this...... bizarre.</div>
      <div><br>
      </div>
      <div>Cheers</div>
      <div>Jason<br>
        <br>
        <div class="gmail_quote">On Mon, Jun 11, 2012 at 2:34 PM,
          Daniel-Constantin Mierla <span dir="ltr">&lt;<a
              moz-do-not-send="true" 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">Module:
            sip-router<br>
            Branch: master<br>
            Commit: 0c7b9304efd5954cf53ba13a065b05a277efc91f<br>
            URL: &nbsp; &nbsp;<a moz-do-not-send="true"
href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0c7b9304efd5954cf53ba13a065b05a277efc91f"
              target="_blank">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0c7b9304efd5954cf53ba13a065b05a277efc91f</a><br>
            <br>
            Author: Daniel-Constantin Mierla &lt;<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;<br>
            Committer: Daniel-Constantin Mierla &lt;<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;<br>
            Date: &nbsp; Mon Jun 11 14:32:44 2012 +0200<br>
            <br>
            registrar(k): don't access realm_prefix.s if len is &lt;=0<br>
            <br>
            - solaris is not happy accessing .s struct field if set to 0<br>
            <br>
            ---<br>
            <br>
            &nbsp;modules_k/registrar/common.c | &nbsp; 10 ++++++----<br>
            &nbsp;1 files changed, 6 insertions(+), 4 deletions(-)<br>
            <br>
            diff --git a/modules_k/registrar/common.c
            b/modules_k/registrar/common.c<br>
            index c682f15..7cb179f 100644<br>
            --- a/modules_k/registrar/common.c<br>
            +++ b/modules_k/registrar/common.c<br>
            @@ -54,7 +54,7 @@ int extract_aor(str* _uri, str* _a,
            sip_uri_t *_pu)<br>
            &nbsp; &nbsp; &nbsp; &nbsp;sip_uri_t *puri;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;int user_len;<br>
            &nbsp; &nbsp; &nbsp; &nbsp;str *uri;<br>
            - &nbsp; &nbsp; &nbsp; str realm_prefix;<br>
            + &nbsp; &nbsp; &nbsp; str realm_prefix = {0};<br>
            <br>
            &nbsp; &nbsp; &nbsp; &nbsp;memset(aor_buf, 0, MAX_AOR_LEN);<br>
            &nbsp; &nbsp; &nbsp; &nbsp;uri=_uri;<br>
            @@ -93,10 +93,12 @@ int extract_aor(str* _uri, str* _a,
            sip_uri_t *_pu)<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (user_len)<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aor_buf[_a-&gt;len++] = '@';<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* strip prefix (if defined) */<br>
            - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; realm_prefix.s = cfg_get(registrar,
            registrar_cfg, realm_pref).s;<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;realm_prefix.len = cfg_get(registrar,
            registrar_cfg, realm_pref).len;<br>
            - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LM_DBG("realm prefix is [%.*s]\n",
            realm_prefix.len,<br>
            - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            (realm_prefix.len&gt;0)?realm_prefix.s:"");<br>
            + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(realm_prefix.len&gt;0) {<br>
            + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; realm_prefix.s = cfg_get(registrar,
            registrar_cfg, realm_pref).s;<br>
            + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LM_DBG("realm prefix is [%.*s]\n",
            realm_prefix.len,<br>
            + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            (realm_prefix.len&gt;0)?realm_prefix.s:"");<br>
            + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (realm_prefix.len&gt;0<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp;&amp;
            realm_prefix.len&lt;puri-&gt;host.len<br>
            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp;&amp;
            (memcmp(realm_prefix.s, puri-&gt;host.s,
            realm_prefix.len)==0))<br>
            <br>
            <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>
          </blockquote>
        </div>
        <br>
      </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 Advanced Training, Seattle, USA, Sep 23-26, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a>
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kpw">http://asipto.com/u/kpw</a></pre>
    <br>
    <br>
  </body>
</html>