Changeset 5811


Ignore:
Timestamp:
Jun 22, 2018 5:13:02 PM (6 years ago)
Author:
riza
Message:

Re #2059 (misc): Fixed some error on transport_srtp.c after #2097 + #2096.

  • Fixed nullptr exception, because opt pointer might not be set.
  • Remove assertion to check pool and sdp in pjmedia_transport_media_start().

Thanks to Ciro Ferraiuolo for the report.

File:
1 edited

Legend:

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

    r5794 r5811  
    737737     * i.e: all available crypto but 'NULL'. 
    738738     */ 
    739     if (srtp->setting.crypto_count == 0 && opt->use != PJMEDIA_SRTP_DISABLED) 
     739    if (srtp->setting.crypto_count == 0 &&  
     740        srtp->setting.use != PJMEDIA_SRTP_DISABLED) 
    740741    { 
    741742        srtp->setting.crypto_count = PJMEDIA_SRTP_MAX_CRYPTOS; 
     
    16441645    unsigned i; 
    16451646 
    1646     PJ_ASSERT_RETURN(tp && pool && sdp_local && sdp_remote, PJ_EINVAL); 
     1647    PJ_ASSERT_RETURN(tp, PJ_EINVAL); 
    16471648 
    16481649    status = pjmedia_transport_media_start(srtp->member_tp, pool, 
Note: See TracChangeset for help on using the changeset viewer.