Ignore:
Timestamp:
Aug 7, 2015 9:00:52 AM (7 years ago)
Author:
ming
Message:

Fixed #1878: Compile time option for TCP/TLS transport to not create a listener

File:
1 edited

Legend:

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

    r5105 r5152  
    340340    } 
    341341 
    342     pool = pjsip_endpt_create_pool(endpt, "tlslis", POOL_LIS_INIT,  
     342    pool = pjsip_endpt_create_pool(endpt, "tlstp", POOL_LIS_INIT,  
    343343                                   POOL_LIS_INC); 
    344344    PJ_ASSERT_RETURN(pool, PJ_ENOMEM); 
     
    355355        pjsip_transport_get_flag_from_type(listener->factory.type); 
    356356 
    357     pj_ansi_strcpy(listener->factory.obj_name, "tlslis"); 
     357    pj_ansi_strcpy(listener->factory.obj_name, "tlstp"); 
    358358    if (is_ipv6) 
    359359        pj_ansi_strcat(listener->factory.obj_name, "6"); 
     
    420420                            &lis_on_destroy); 
    421421 
     422#if !(defined(PJSIP_TLS_TRANSPORT_DONT_CREATE_LISTENER) && \ 
     423      PJSIP_TLS_TRANSPORT_DONT_CREATE_LISTENER != 0) 
     424 
    422425    ssock_param.grp_lock = listener->grp_lock; 
    423426 
     
    426429    if (status != PJ_SUCCESS) 
    427430        goto on_error; 
     431 
     432#endif 
    428433 
    429434    /* Bind address may be different than factory.local_addr because 
     
    439444        pj_sockaddr_init(af, &listener->bound_addr, NULL, 0); 
    440445    } 
     446 
     447#if !(defined(PJSIP_TLS_TRANSPORT_DONT_CREATE_LISTENER) && \ 
     448      PJSIP_TLS_TRANSPORT_DONT_CREATE_LISTENER != 0) 
    441449 
    442450    /* Check if certificate/CA list for SSL socket is set */ 
     
    481489    } 
    482490 
     491#endif 
     492 
    483493    /* If published host/IP is specified, then use that address as the 
    484494     * listener advertised address. 
     
    519529    pj_ansi_snprintf(listener->factory.obj_name,  
    520530                     sizeof(listener->factory.obj_name), 
    521                      "tlslis:%d",  listener->factory.addr_name.port); 
     531                     "tlstp:%d",  listener->factory.addr_name.port); 
    522532 
    523533    /* Register to transport manager */ 
     
    570580        pj_pool_t *pool = listener->factory.pool; 
    571581 
    572         PJ_LOG(4,(listener->factory.obj_name,  "SIP TLS listener destroyed")); 
     582        PJ_LOG(4,(listener->factory.obj_name,  "SIP TLS transport destroyed")); 
    573583 
    574584        listener->factory.pool = NULL; 
Note: See TracChangeset for help on using the changeset viewer.