Changeset 3961
- Timestamp:
- Feb 28, 2012 10:38:32 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjmedia/src/pjmedia/transport_srtp.c
r3553 r3961 908 908 { 909 909 /* Handle such condition that stream is updated (RTP seq is reinited 910 * & SRTP is restarted), but some old packets are still coming 911 * so SRTP is learning wrong RTP seq. While the newly inited RTP seq 912 * comes, SRTP thinks the RTP seq is replayed, so srtp_unprotect() 913 * will returning err_status_replay_*. Restarting SRTP can resolve 914 * this. 915 */ 916 if (pjmedia_transport_srtp_start((pjmedia_transport*)srtp, 917 &srtp->tx_policy, &srtp->rx_policy) 918 != PJ_SUCCESS) 919 { 910 * & SRTP is restarted), but some old packets are still coming 911 * so SRTP is learning wrong RTP seq. While the newly inited RTP seq 912 * comes, SRTP thinks the RTP seq is replayed, so srtp_unprotect() 913 * will return err_status_replay_*. Restarting SRTP can resolve this. 914 */ 915 pjmedia_srtp_crypto tx, rx; 916 pj_status_t status; 917 918 tx = srtp->tx_policy; 919 rx = srtp->rx_policy; 920 status = pjmedia_transport_srtp_start((pjmedia_transport*)srtp, 921 &tx, &rx); 922 if (status != PJ_SUCCESS) { 920 923 PJ_LOG(5,(srtp->pool->obj_name, "Failed to restart SRTP, err=%s", 921 924 get_libsrtp_errstr(err))); 922 } else {925 } else if (!srtp->bypass_srtp) { 923 926 err = srtp_unprotect(srtp->srtp_rx_ctx, (pj_uint8_t*)pkt, &len); 924 927 }
Note: See TracChangeset
for help on using the changeset viewer.