Changeset 6115


Ignore:
Timestamp:
Dec 4, 2019 9:01:19 AM (4 years ago)
Author:
nanang
Message:

Fix #2254: Updated SDP encoder of SDES to avoid deactivating/disabling media, it should be done by the parent/SRTP instead.

Location:
pjproject/trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c

    r5982 r6115  
    16411641 
    16421642    /* All keying method failed to process remote SDP? */ 
    1643     if (srtp->keying_cnt == 0) 
     1643    if (srtp->keying_cnt == 0) { 
     1644        if (keying_status != PJ_SUCCESS) { 
     1645            DEACTIVATE_MEDIA(sdp_pool, sdp_local->media[media_index]); 
     1646        } 
    16441647        return keying_status; 
     1648    } 
    16451649 
    16461650    /* Bypass SRTP & skip keying as SRTP is disabled and verification on 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp_sdes.c

    r5982 r6115  
    473473                for (j=0; j<cr_attr_count; ++j) { 
    474474                    if (tags[j] == tags[cr_attr_count]) { 
    475                         DEACTIVATE_MEDIA(sdp_pool, m_loc); 
     475                        //DEACTIVATE_MEDIA(sdp_pool, m_loc); 
    476476                        return PJMEDIA_SRTP_ESDPDUPCRYPTOTAG; 
    477477                    } 
     
    514514                     */ 
    515515                    if ((!has_crypto_attr || matched_idx == -1) && 
    516                         rem_proto == PJMEDIA_TP_PROTO_RTP_AVP) 
     516                        !PJMEDIA_TP_PROTO_HAS_FLAG(rem_proto, 
     517                                                   PJMEDIA_TP_PROFILE_SRTP)) 
    517518                    { 
    518519                        return PJ_SUCCESS; 
     
    527528            /* No crypto attr */ 
    528529            if (!has_crypto_attr) { 
    529                 DEACTIVATE_MEDIA(sdp_pool, m_loc); 
     530                //DEACTIVATE_MEDIA(sdp_pool, m_loc); 
    530531                return PJMEDIA_SRTP_ESDPREQCRYPTO; 
    531532            } 
     
    533534            /* No crypto match */ 
    534535            if (matched_idx == -1) { 
    535                 DEACTIVATE_MEDIA(sdp_pool, m_loc); 
     536                //DEACTIVATE_MEDIA(sdp_pool, m_loc); 
    536537                return PJMEDIA_SRTP_ENOTSUPCRYPTO; 
    537538            } 
Note: See TracChangeset for help on using the changeset viewer.