Ignore:
Timestamp:
Jul 1, 2019 5:41:29 AM (5 years ago)
Author:
riza
Message:

Re #2210 (misc): Minor patch for SSL error message. Thanks to George Joseph for the patch.

File:
1 edited

Legend:

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

    r6004 r6034  
    174174 
    175175static void tls_perror(const char *sender, const char *title, 
    176                        pj_status_t status) 
    177 { 
    178     PJ_PERROR(3,(sender, status, "%s: [code=%d]", title, status)); 
     176                       pj_status_t status, pj_str_t *remote_name) 
     177{ 
     178    PJ_PERROR(3,(sender, status, "%s: [code=%d]%s%.*s", title, status, 
     179        remote_name ? " peer: " : "", remote_name ? remote_name->slen : 0, 
     180        remote_name ? remote_name->ptr : "")); 
    179181} 
    180182 
     
    731733    if (status != PJ_SUCCESS) {  
    732734        tls_perror(listener->factory.obj_name,  
    733                    "Unable to start listener after closing it", status); 
     735                   "Unable to start listener after closing it", status, NULL); 
    734736 
    735737        return status; 
     
    740742    if (status != PJ_SUCCESS) { 
    741743        tls_perror(listener->factory.obj_name, 
    742                     "Unable to register the transport listener", status); 
     744                    "Unable to register the transport listener", status, NULL); 
    743745 
    744746        listener->is_registered = PJ_FALSE;      
     
    10861088                                   PJSIP_POOL_RDATA_INC); 
    10871089    if (!pool) { 
    1088         tls_perror(tls->base.obj_name, "Unable to create pool", PJ_ENOMEM); 
     1090        tls_perror(tls->base.obj_name, "Unable to create pool", PJ_ENOMEM, 
     1091                   NULL); 
    10891092        return PJ_ENOMEM; 
    10901093    } 
     
    17731776    if (status != PJ_SUCCESS) { 
    17741777 
    1775         tls_perror(tls->base.obj_name, "TLS connect() error", status); 
     1778        tls_perror(tls->base.obj_name, "TLS connect() error", status, 
     1779                   &tls->remote_name); 
    17761780 
    17771781        /* Cancel all delayed transmits */ 
     
    19171921    if (is_shutdown) { 
    19181922        status = tls->close_reason; 
    1919         tls_perror(tls->base.obj_name, "TLS connect() error", status); 
     1923        tls_perror(tls->base.obj_name, "TLS connect() error", status,  
     1924                   &tls->remote_name); 
    19201925 
    19211926        /* Cancel all delayed transmits */ 
     
    20162021    if (status != PJ_SUCCESS && status != PJ_EPENDING) { 
    20172022        tls_perror(tls->base.obj_name,  
    2018                    "Error sending keep-alive packet", status); 
     2023                   "Error sending keep-alive packet", status, 
     2024                   &tls->remote_name); 
    20192025 
    20202026        tls_init_shutdown(tls, status); 
Note: See TracChangeset for help on using the changeset viewer.