Thank you Andrew, it worked great :)<br><br><br clear="all">Alejandro Rios<br><br>
<br><br><div class="gmail_quote">2011/4/13 Andrew Mortensen <span dir="ltr">&lt;<a href="mailto:admorten@isc.upenn.edu">admorten@isc.upenn.edu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Apr 13, 2011, at 6:57 PM, Alejandro Rios P. wrote:<br>
<br>
&gt; Hi All,<br>
&gt;<br>
&gt; I&#39;ve been playing a little bit with the source code of &#39;closeddial&#39; module (v1.6.2), and I&#39;m having an issue with the &#39;parse_from_uri&#39; function:<br>
&gt;<br>
</div>&gt; ...<br>
<div class="im">&gt;<br>
&gt; 3. Then, I&#39;m trying to use the &#39;host&#39; part:<br>
</div>&gt; ...<br>
<div class="im">&gt;                 LM_DBG(&quot;Comparing domain %s\n&quot;, from_uri-&gt;host.s);<br>
&gt;         }<br>
&gt;<br>
&gt;<br>
&gt; 4. But when running using debug, I&#39;m getting not only the host part, but everything else in the rest of the message:<br>
<br>
</div>The &quot;s&quot; field isn&#39;t null terminated. You need to use the special %.*s placeholder for str variables:<br>
<br>
LM_DBG(&quot;Comparing domain %.*s\n&quot;, from_uri-&gt;host.len, from_uri-&gt;host.s);<br>
<br>
andrew<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
</blockquote></div><br>