Changeset 5936


Ignore:
Timestamp:
Feb 26, 2019 3:40:57 AM (6 years 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.

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c

    r5935 r5936  
    17131713                      errmsg)); 
    17141714 
    1715             if (*ssock->param.cb.on_accept_complete2) { 
     1715            if (ssock->param.cb.on_accept_complete2) { 
    17161716                (*ssock->param.cb.on_accept_complete2)  
    17171717                      (ssock->parent, ssock, (pj_sockaddr_t*)&ssock->rem_addr,  
     
    25502550 
    25512551        if (ssock->param.cb.on_accept_complete2) { 
    2552             (*ssock->param.cb.on_accept_complete2) (ssock->parent, ssock,  
     2552            (*ssock->param.cb.on_accept_complete2) (ssock, NULL,  
    25532553                                                    src_addr, src_addr_len,  
    25542554                                                    status); 
  • 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.