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"><<a href="mailto:admorten@isc.upenn.edu">admorten@isc.upenn.edu</a>></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>
> Hi All,<br>
><br>
> I've been playing a little bit with the source code of 'closeddial' module (v1.6.2), and I'm having an issue with the 'parse_from_uri' function:<br>
><br>
</div>> ...<br>
<div class="im">><br>
> 3. Then, I'm trying to use the 'host' part:<br>
</div>> ...<br>
<div class="im">> LM_DBG("Comparing domain %s\n", from_uri->host.s);<br>
> }<br>
><br>
><br>
> 4. But when running using debug, I'm getting not only the host part, but everything else in the rest of the message:<br>
<br>
</div>The "s" field isn't null terminated. You need to use the special %.*s placeholder for str variables:<br>
<br>
LM_DBG("Comparing domain %.*s\n", from_uri->host.len, from_uri->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>