Changeset 5889


Ignore:
Timestamp:
Sep 21, 2018 8:29:12 AM (9 months ago)
Author:
nanang
Message:

Re #2150: Added native SSL error code in SIP TLS accept failure callback.

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_transport_tls.h

    r5888 r5889  
    7575#endif 
    7676 
     77 
    7778/** 
    7879 * This structure describe the parameter passed from #on_accept_fail_cb(). 
     
    9495    pj_status_t status; 
    9596 
     97    /** 
     98     * Last error code returned by native SSL backend. Note that this may be 
     99     * zero, if the failure is not SSL related (e.g: accept rejection). 
     100     */ 
     101    pj_status_t last_native_err; 
     102 
    96103} pjsip_tls_on_accept_fail_param; 
     104 
    97105 
    98106/** 
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_tls.c

    r5888 r5889  
    13251325        if (listener->tls_setting.on_accept_fail_cb) { 
    13261326            pjsip_tls_on_accept_fail_param param; 
     1327            pj_ssl_sock_info ssi; 
     1328 
    13271329            pj_bzero(&param, sizeof(param)); 
    13281330            param.status = accept_status; 
    13291331            param.local_addr = &listener->factory.local_addr; 
    13301332            param.remote_addr = src_addr; 
     1333            if (pj_ssl_sock_get_info(new_ssock, &ssi) == PJ_SUCCESS) 
     1334                param.last_native_err = ssi.last_native_err; 
     1335 
    13311336            (*listener->tls_setting.on_accept_fail_cb) (&param); 
    13321337        } 
Note: See TracChangeset for help on using the changeset viewer.