[sr-dev] [Kamailio-Devel] duplicate db_res_t

Chandrakant Solanki solanki.chandrakant at gmail.com
Fri Aug 6 10:38:13 CEST 2010


Hello

I am using kamailio 1.5.0.2.

I have developed one custom function in module, and also create one custom
structure to store database recordset.

What I would like to do is...

1] I have structure say struct record and it has variable
          struct record {
               int id;
               char name;
               db_res_t *res;
          };
2] Execute one query and store result into "db_res" variable of db_res_t
datatype;
3] Now I would like to preserve 'n in future i will use this recordset.. so
how can i store this "db_res" variable into structure variable.

I have tried using below syntax...

struct record rec[2];

db_res = get_record( "pass_any_query" );
rec[0].res = db_res;

But when I used this rec[0].res in future it gives garbage value.

Any Idea...???


-- 
Regards,

Chandrakant Solanki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20100806/6e1f73cb/attachment-0001.htm>


More information about the sr-dev mailing list