Browse Source

TT#14008 only reset SRTP ROC when doing RTP reset

relevant to #1443

Change-Id: I1d03e121ceeaf70268718f233871b96ba4112120
(cherry picked from commit a6ebb70789)
mr10.3
Richard Fuchs 4 years ago
parent
commit
cd54fd0461
1 changed files with 15 additions and 13 deletions
  1. +15
    -13
      daemon/call.c

+ 15
- 13
daemon/call.c View File

@ -1170,21 +1170,23 @@ void call_stream_crypto_reset(struct packet_stream *ps) {
crypto_reset(&ps->crypto);
mutex_lock(&ps->in_lock);
for (unsigned int u = 0; u < G_N_ELEMENTS(ps->ssrc_in); u++) {
if (!ps->ssrc_in[u]) // end of list
break;
ps->ssrc_in[u]->srtp_index = 0;
}
mutex_unlock(&ps->in_lock);
if (PS_ISSET(ps, RTP)) {
mutex_lock(&ps->in_lock);
for (unsigned int u = 0; u < G_N_ELEMENTS(ps->ssrc_in); u++) {
if (!ps->ssrc_in[u]) // end of list
break;
ps->ssrc_in[u]->srtp_index = 0;
}
mutex_unlock(&ps->in_lock);
mutex_lock(&ps->out_lock);
for (unsigned int u = 0; u < G_N_ELEMENTS(ps->ssrc_out); u++) {
if (!ps->ssrc_out[u]) // end of list
break;
ps->ssrc_out[u]->srtp_index = 0;
mutex_lock(&ps->out_lock);
for (unsigned int u = 0; u < G_N_ELEMENTS(ps->ssrc_out); u++) {
if (!ps->ssrc_out[u]) // end of list
break;
ps->ssrc_out[u]->srtp_index = 0;
}
mutex_unlock(&ps->out_lock);
}
mutex_unlock(&ps->out_lock);
}
/* called with call locked in R or W, but ps not locked */


Loading…
Cancel
Save