Ignore:
Timestamp:
Mar 11, 2008 9:38:05 PM (14 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/pjmedia/src/pjmedia/transport_ice.c

    r1810 r1860  
    5656 */ 
    5757static pj_status_t transport_get_info (pjmedia_transport *tp, 
    58                                        pjmedia_sock_info *info); 
     58                                       pjmedia_transport_info *info); 
    5959static pj_status_t transport_attach   (pjmedia_transport *tp, 
    6060                                       void *user_data, 
     
    674674 
    675675static pj_status_t transport_get_info(pjmedia_transport *tp, 
    676                                       pjmedia_sock_info *info) 
     676                                      pjmedia_transport_info *info) 
    677677{ 
    678678    struct transport_ice *tp_ice = (struct transport_ice*)tp; 
     
    680680    pj_ice_strans_comp *comp; 
    681681 
    682     pj_bzero(info, sizeof(*info)); 
    683     info->rtp_sock = info->rtcp_sock = PJ_INVALID_SOCKET; 
     682    pj_bzero(&info->sock_info, sizeof(info->sock_info)); 
     683    info->sock_info.rtp_sock = info->sock_info.rtcp_sock = PJ_INVALID_SOCKET; 
    684684 
    685685    /* Retrieve address of default candidate for component 1 (RTP) */ 
    686686    comp = ice_st->comp[0]; 
    687687    pj_assert(comp->default_cand >= 0); 
    688     info->rtp_sock = comp->sock; 
    689     pj_memcpy(&info->rtp_addr_name,  
     688    info->sock_info.rtp_sock = comp->sock; 
     689    pj_memcpy(&info->sock_info.rtp_addr_name,  
    690690              &comp->cand_list[comp->default_cand].addr, 
    691691              sizeof(pj_sockaddr_in)); 
     
    695695        comp = ice_st->comp[1]; 
    696696        pj_assert(comp->default_cand >= 0); 
    697         info->rtp_sock = comp->sock; 
    698         pj_memcpy(&info->rtcp_addr_name,  
     697        info->sock_info.rtp_sock = comp->sock; 
     698        pj_memcpy(&info->sock_info.rtcp_addr_name,  
    699699                  &comp->cand_list[comp->default_cand].addr, 
    700700                  sizeof(pj_sockaddr_in)); 
    701701    } 
    702702 
     703    info->specific_info_cnt = 0; 
    703704 
    704705    return PJ_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.