Sorry, a small correction :)<br>tmp_id.len = 10;<br>tmp_id.s = (char *)pkg_malloc(tmp_id.len * sizeof(char));<br>snprintf(tmp_id.s, tmp_id.len, &quot;%d&quot;, row-&gt;values[COL_ID].val.int_val);<br><br><div class="gmail_quote">

2013/1/29 Konstantin M. <span dir="ltr">&lt;<a href="mailto:evilzluk@gmail.com" target="_blank">evilzluk@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

char buf[10];<br>snprintf(buf, sizeof(buf), &quot;%d&quot;, (char *)row-&gt;values[COL_ID].val.int_val);<br><br>?<br><br><div class="gmail_quote">2013/1/29 Mino Haluz <span dir="ltr">&lt;<a href="mailto:mino.haluz@gmail.com" target="_blank">mino.haluz@gmail.com</a>&gt;</span><br>


<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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">I&#39;m changing carrierroute module so that it could set into another avp the ID of the rule that was chosen. I have already adjusted all functions but I have still one problem when kamailio starts.</div>



<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>tmp_id.s=(char *)row-&gt;values[COL_ID].val.string_val;</div><div><br></div><div>It gives Segfault at this line. The question is, how can I convert the row value that is int(10) to char (tmp_id is const str *, it is the same as comment). Thanks,</div>



<div><br></div><div>Mino</div></div></div>
<br></div></div>_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a 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>
<br></blockquote></div><br>
</blockquote></div><br>