[OpenSER-Devel] Possible bug in acc_logic.c:acc_onreq?
Phil D'Amore
ptdamore at gmail.com
Fri Feb 15 21:54:53 CET 2008
Hello:
In the acc_onreq function in acc_logic.c there is this code:
tmcb_types =
/* report on completed transactions */
TMCB_RESPONSE_OUT |
/* account e2e acks if configured to do so */
((report_ack && is_acc_on(ps->req))?TMCB_E2EACK_IN:0) |
/* get incoming replies ready for processing */
TMCB_RESPONSE_IN |
/* report on missed calls */
((is_invite(t) &&
is_mc_on(ps->req))?TMCB_ON_FAILURE:0) ;
I think the is_invite(t) in there is invalid. is_invite relies on the
T_IS_INVITE_FLAG flag being set in t->flags. At the time
TMCB_REQUEST_IN callbacks are run, that flag will never be set,
because init_new_t which sets that flag has not yet been called. That
means that TMCB_ON_FAILURE will never be set and callbacks will never
happen for it. As a result, failures don't generate records unless
the failure is relayed.
It seems that this should be done with (ps->req->REQ_METHOD==METHOD_INVITE).
Can anyone tell me if my assessment is correct?
More information about the Devel
mailing list