Opened 8 years ago

Closed 8 years ago

#1936 closed defect (fixed)

Sending REGISTER always fails after losing network connection

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.5.5
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Reported that there is a case that sending REGISTER will always fail because regc->has_tsx value is always equal to PJ_TRUE and it is never changed, here is the detail:

  1. when sending SIP REGISTER message, pjsip_regc_send() will first set regc->has_tsx to PJ_TRUE then invoke pjsip_endpt_send_request().
  2. pjsip_tsx_create_uac() fails and callback specified in pjsip_endpt_send_request() param, i.e: regc_tsx_callback(), is not called.
  3. Unfortunately, the callback is the only place where regc->has_tsx will be resetted to PJ_FALSE.
  4. Any future calls to pjsip_regc_send() will return PJ_EBUSY as it thinks there is an outstanding transaction (represented by regc->has_tsx == PJ_TRUE).

Thanks Fredrik Hansson for the report and the fix.

Change History (1)

comment:1 Changed 8 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed

In 5353:

Fix #1936: Reset 'regc->has_tsx' when the sending fails.

Note: See TracTickets for help on using tickets.