Changeset 5781 for pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
- Timestamp:
- Apr 17, 2018 10:52:33 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r5773 r5781 682 682 PJ_ASSERT_RETURN(endpt && tp && p_tp, PJ_EINVAL); 683 683 684 /* Check crypto availability */685 if (opt && opt->crypto_count == 0 &&686 opt->use == PJMEDIA_SRTP_MANDATORY)687 return PJMEDIA_SRTP_ESDPREQCRYPTO;688 689 684 /* Check crypto */ 690 685 if (opt && opt->use != PJMEDIA_SRTP_DISABLED) { … … 740 735 * i.e: all available crypto but 'NULL'. 741 736 */ 742 if (srtp->setting.crypto_count == 0) { 737 if (srtp->setting.crypto_count == 0 && opt->use != PJMEDIA_SRTP_DISABLED) 738 { 743 739 srtp->setting.crypto_count = PJMEDIA_SRTP_MAX_CRYPTOS; 744 740 pjmedia_srtp_enum_crypto(&srtp->setting.crypto_count, … … 1115 1111 /* Save the callbacks */ 1116 1112 pj_lock_acquire(srtp->mutex); 1117 srtp->rtp_cb = param->rtp_cb; 1118 srtp->rtp_cb2 = param->rtp_cb2; 1119 srtp->rtcp_cb = param->rtcp_cb; 1120 srtp->user_data = param->user_data; 1113 if (param->rtp_cb || param->rtp_cb2) { 1114 /* Do not update rtp_cb if not set, as attach() is called by 1115 * keying method. 1116 */ 1117 srtp->rtp_cb = param->rtp_cb; 1118 srtp->rtp_cb2 = param->rtp_cb2; 1119 srtp->rtcp_cb = param->rtcp_cb; 1120 srtp->user_data = param->user_data; 1121 } 1121 1122 pj_lock_release(srtp->mutex); 1122 1123
Note: See TracChangeset
for help on using the changeset viewer.