On 12 Jun 2008, at 19:54, Benny Prijono wrote: > On Thu, Jun 12, 2008 at 5:40 PM, Ruud Klaver <ruud at ag-projects.com> > wrote: >> Hi Benny, >> >> I'm a bit confused about the setting of regc->current_op in the >> tsx_callback function of sip_reg.c. As far as I can see there are 4 >> branches and regc->current_op gets set to REGC_IDLE in 3 out of those >> 4. Now for some reason I am getting a non-auth related 4xx reply from >> my sip proxy on registration, which leaves the current_op attribute >> set to REGC_REGISTERING. Now when I try to resend my registration, I >> get an assertion failure. >> > > Frankly I'm not sure if that scenario is supposed to be supported (I > mean resending REGISTER request using the same regc session when > callback is called with failure). Normally what I do is to destroy the > regc and create a new one, so I'm not sure that after we fix > regc->current_op nothing else will fail. > > Cheers > Benny You've got a point there, maybe it's not logical to try to re-register with the same regc object when you know it has failed. However it seems re-registering is quite possible when the authentication fails. When it gets some other 4xx response, it gets stuck in that inconsistent state and crashes because of the assertion failure. This sounds wrong to me, in the end there is no harm in allowing re-registration. Ruud Klaver AG Projects