[OpenSIPS-Devel] Fixing the 200OK - ACK race in OpenSIPS 1.4
Saúl Ibarra Corretgé
saul at ag-projects.com
Fri Feb 12 13:31:43 CET 2010
Hi Bogdan,
A while ago the race between 200OK and ACK was spotted and fixed
according to this ticket:
http://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2080954&group_id=232389
That fix was made after version 1.4 was released, so this version
doesn't include it. Currently I can't upgrade OpenSIPS from version 1.4
and this issue started affecting so I tried backporting the fix myself.
I backported svn revisions 5420 and 5422 but it didn't work :-(
AFAIS in the changes, a new callback was added to the TM module to deal
with this situation (TMCP_RESPONSE_PRE_OUT) which should set the proper
state when the 200 OK is sent so the race with the ACK is avoided. Is
this correct?
Then, this callback is registered in the dlg_create_dialog function, but
OpenSIPS doesn't have this function and all the functionality seems to
be done in dlg_onreq. Because of this, rev 5422 doesn't apply correctly
to version 1.4, so I modified dlg_onreq to "match" dlg_create_dialog in
the following way:
if ( d_tmb.register_tmcb( 0, t,
TMCB_RESPONSE_PRE_OUT|TMCB_TRANS_DELETED|TMCB_RESPONSE_FWDED,
dlg_onreply, (void*)dlg, 0)<0 ) {
LM_ERR("failed to register TMCB\n");
goto error;
}
After some testing I can see the error is still occurring (I see bogus
state 6 for state 1 in the logs) so I'm a bit lost here.
I know it's been long since you did this change but do you recall if
some other change needs to be backported or if am in the right path for
backporting this?
Thank you in advance, best regards
--
Saúl Ibarra Corretgé
AG Projects
More information about the Devel
mailing list