Thanks for the pointing Chih. The fact is that i was expecting,
perhaps, suggestions or corrections about how to implement what im
trying to do in Asterisk, not only "free and easy training for a
newbie". Anyway, thanks again, the next time I will think better if the
question is worth to be posted here.<br>
<br>
regards<br><br><div><span class="gmail_quote">On 12/13/05, <b class="gmail_sendername">Chih-Wei Huang</b> &lt;<a href="mailto:cwhuang@citron.com.tw">cwhuang@citron.com.tw</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Moises Silva wrote:<br>&gt; Thanks Marc. I have read about alloca(), malloc(), free() etc. And yes,in<br>&gt; fact im freeing the memory used by malloc with free(). So I dont know why it<br>&gt; dies (and even if i did not free the memory, should not die for a single
<br>&gt; call does it?).<br>&gt;<br>&gt; the whole file is in:<br>&gt; <a href="http://galileo.ivsol.net/scripts/app_dumpchan.c">http://galileo.ivsol.net/scripts/app_dumpchan.c</a><br>&gt;<br><br>First, this is a list for Asterisk development, not for
<br>a C language training for a newbie.<br>Your problem didn't related to any development of Asterisk.<br>You just misused the realloc function:<br><br>vars_buffer = (char *)realloc(vars_buffer, new_string_size);<br><br>The pointer passed to realloc must be a pointer returned by
<br>malloc/calloc/realloc. You can't use it to adjust a static buffer.<br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>
Asterisk-Dev mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br>
<br clear="all"><br>-- <br>&quot;Su nombre es GNU/Linux, no solamente Linux, mas info en <a href="http://www.gnu.org">http://www.gnu.org</a>&quot;