Dear developers,

I'm currently developing some OpenSER modules which will log the status
of all outgoing branches in the failure route. Based on what I could see
in other modules I figured out that something like this would do that:

t=tm.t_gett();
for( branch_counter=t->first_branch ;
branch_counter<(t->nr_of_outgoings+t->first_branch); branch_counter++)
{
        //Log everything.
}

For the logging I get most of the data from
t->uac[branch_counter].reply, and most of the time this works fine. Only
sometimes I get segfaults when accessing the reply structure. I check if
the pointer to this struct isn't NULL or FAKED_REPLY, but still my
module crashes whenever a 408 is generated by a timeout. 

So my question is: Am I doing something wrong, how can I check if the
reply pointer will be valid? Or is this a bug in the TM module and
should it have set the pointer to a usable value? Thanks in advance for
the information.

Kind regards,
Ardjan Zwartjes.

_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to