Ignore:
Timestamp:
Mar 11, 2008 9:38:05 PM (17 years ago)
Author:
bennylp
Message:

Ticket #479: allow media transport framework to return transport specific info (for example, to know whether SRTP is enabled)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r1855 r1860  
    261261    pjsip_tx_data *tdata; 
    262262    pjsip_response_addr res_addr; 
    263     pjmedia_sock_info skinfo; 
     263    pjmedia_transport_info tpinfo; 
    264264    pjmedia_sdp_session *sdp; 
    265265    const pjsip_hdr *cap_hdr; 
     
    321321 
    322322    /* Get media socket info */ 
    323     pjmedia_transport_get_info(pjsua_var.calls[0].med_tp, &skinfo); 
     323    pjmedia_transport_get_info(pjsua_var.calls[0].med_tp, &tpinfo); 
    324324 
    325325    /* Add SDP body, using call0's RTP address */ 
    326326    status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, tdata->pool, 1, 
    327                                       &skinfo, &sdp); 
     327                                      &tpinfo.sock_info, &sdp); 
    328328    if (status == PJ_SUCCESS) { 
    329329        pjsip_create_sdp_body(tdata->pool, sdp, &tdata->msg->body); 
     
    20612061    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) { 
    20622062        pjsua_call *call = &pjsua_var.calls[i]; 
    2063         pjmedia_sock_info skinfo; 
     2063        pjmedia_transport_info tpinfo; 
    20642064        char addr_buf[80]; 
    20652065 
    2066         /* MSVC complains about skinfo not being initialized */ 
    2067         pj_bzero(&skinfo, sizeof(skinfo)); 
    2068  
    2069         pjmedia_transport_get_info(call->med_tp, &skinfo); 
     2066        /* MSVC complains about tpinfo not being initialized */ 
     2067        pj_bzero(&tpinfo, sizeof(tpinfo)); 
     2068 
     2069        pjmedia_transport_get_info(call->med_tp, &tpinfo); 
    20702070 
    20712071        PJ_LOG(3,(THIS_FILE, " %s: %s", 
    20722072                  (pjsua_var.media_cfg.enable_ice ? "ICE" : "UDP"), 
    2073                   pj_sockaddr_print(&skinfo.rtp_addr_name, addr_buf, 
     2073                  pj_sockaddr_print(&tpinfo.sock_info.rtp_addr_name, addr_buf, 
    20742074                                    sizeof(addr_buf), 3))); 
    20752075    } 
Note: See TracChangeset for help on using the changeset viewer.