<div>Hello<br clear="all"></div><div><br></div><div>I am using kamailio 1.5.0.2.</div><div><br></div><div>I have developed one custom function in module, and also create one custom structure to store database recordset.</div>
<div><br></div><div>What I would like to do is...</div><div><br></div><div>1] I have structure say struct record and it has variable</div><div>          struct record {</div><div>               int id;</div><div>               char name;</div>
<div>               db_res_t *res;</div><div>          };</div><div>2] Execute one query and store result into &quot;db_res&quot; variable of db_res_t datatype;</div><div>3] Now I would like to preserve &#39;n in future i will use this recordset.. so how can i store this &quot;db_res&quot; variable into structure variable.</div>
<div><br></div><div>I have tried using below syntax...</div><div><br></div><div>struct record rec[2];</div><div><br></div><div>db_res = get_record( &quot;pass_any_query&quot; );</div><div>rec[0].res = db_res;</div><div><br>
</div><div>But when I used this rec[0].res in future it gives garbage value.</div><div><br></div><div>Any Idea...???</div><div><br></div><br>-- <br>Regards,<br><br>Chandrakant Solanki<br>