Ignore:
Timestamp:
Feb 26, 2019 3:40:57 AM (20 months ago)
Author:
nanang
Message:

Re #2150: Fixed crash in SIP TLS transport after TCP socket accept error, e.g: after wakeup from background on iOS. Thanks Marcus Froeschl for the report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_tls.c

    r5889 r5936  
    13231323 
    13241324    if (accept_status != PJ_SUCCESS) { 
    1325         if (listener->tls_setting.on_accept_fail_cb) { 
     1325        if (listener && listener->tls_setting.on_accept_fail_cb) { 
    13261326            pjsip_tls_on_accept_fail_param param; 
    13271327            pj_ssl_sock_info ssi; 
     
    13311331            param.local_addr = &listener->factory.local_addr; 
    13321332            param.remote_addr = src_addr; 
    1333             if (pj_ssl_sock_get_info(new_ssock, &ssi) == PJ_SUCCESS) 
     1333            if (new_ssock && 
     1334                pj_ssl_sock_get_info(new_ssock, &ssi) == PJ_SUCCESS) 
     1335            { 
    13341336                param.last_native_err = ssi.last_native_err; 
     1337            } 
    13351338 
    13361339            (*listener->tls_setting.on_accept_fail_cb) (&param); 
Note: See TracChangeset for help on using the changeset viewer.