pjsip / pjproject

PJSIP project
http://www.pjsip.org
GNU General Public License v2.0
2.07k stars 786 forks source link

Reset regc info transport #4168

Closed trengginas closed 4 days ago

trengginas commented 4 days ago

Consider the scenario:

  1. Registration Sent
  2. SIP connection used by the registration is closed, no response has been received yet
  3. pjsua_handle_ip_change() is called.
  4. Later the process will check the transport used by the registration and tried to shutdown it. https://github.com/pjsip/pjproject/blob/2e6a988deb58d1532b8968d76bc2eae5445d8df3/pjsip/src/pjsua-lib/pjsua_core.c#L3729 The info.transport will contain an already shutdown/destroyed transport since from info_transport which is not reset when pjsip_regc_release_transport is called.

Note: Since pjsua_handle_ip_change() has the option to shutdown all the transport, then checking all the transport used by the registration to shutdown is redundant and no longer needed.