Ignore:
Timestamp:
Jun 19, 2014 5:07:12 AM (10 years ago)
Author:
riza
Message:

Re #1771: Implement run-time configuration to set specific socket option.

File:
1 edited

Legend:

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

    r4817 r4860  
    6161    pj_qos_type              qos_type; 
    6262    pj_qos_params            qos_params; 
     63    pj_sockopt_params        sockopt_params; 
    6364}; 
    6465 
     
    285286    pj_memcpy(&listener->qos_params, &cfg->qos_params, 
    286287              sizeof(cfg->qos_params)); 
     288    pj_memcpy(&listener->sockopt_params, &cfg->sockopt_params, 
     289              sizeof(cfg->sockopt_params)); 
    287290 
    288291    pj_ansi_strcpy(listener->factory.obj_name, "tcplis"); 
     
    316319        } 
    317320    } 
     321 
     322    /* Apply socket options, if specified */ 
     323    if (cfg->sockopt_params.cnt) 
     324        status = pj_sock_setsockopt_params(sock, &cfg->sockopt_params); 
    318325 
    319326    /* Bind address may be different than factory.local_addr because 
     
    918925                                2, listener->factory.obj_name,  
    919926                                "outgoing SIP TCP socket"); 
     927 
     928    /* Apply socket options, if specified */ 
     929    if (listener->sockopt_params.cnt) 
     930        status = pj_sock_setsockopt_params(sock, &listener->sockopt_params); 
     931 
    920932 
    921933    /* Bind to listener's address and any port */ 
     
    10361048                                2, listener->factory.obj_name,  
    10371049                                "incoming SIP TCP socket"); 
     1050 
     1051    /* Apply socket options, if specified */ 
     1052    if (listener->sockopt_params.cnt) 
     1053        status = pj_sock_setsockopt_params(sock, &listener->sockopt_params); 
    10381054 
    10391055    /* tcp_create() expect pj_sockaddr, so copy src_addr to temporary var, 
Note: See TracChangeset for help on using the changeset viewer.