TT#14008 add extra logging for SRTP/SSRC updates

Change-Id: I564193c919563ec14c61db1031f696d5029e6e40
pull/1457/head
Richard Fuchs 4 years ago
parent 408015141c
commit 014301bee8

@ -587,6 +587,8 @@ void call_timer(void *ptr) {
if (!sfd)
goto next;
log_info_stream_fd(sfd);
rwlock_lock_r(&sfd->call->master_lock);
ps = sfd->stream;
@ -665,6 +667,10 @@ void call_timer(void *ptr) {
if (sink->crypto.params.crypto_suite
&& o->encrypt.last_index[u] - ctx->srtp_index > 0x4000)
{
ilog(LOG_DEBUG, "Updating SRTP encryption index from %" PRIu64
" to %" PRIu64,
ctx->srtp_index,
o->encrypt.last_index[u]);
ctx->srtp_index = o->encrypt.last_index[u];
update = true;
}
@ -684,12 +690,17 @@ void call_timer(void *ptr) {
atomic64_add(&ctx->octets, diff_bytes);
atomic64_add(&ctx->packets, diff_packets);
atomic64_set(&ctx->last_seq, ke->target.decrypt.last_index[u]);
ctx->srtp_index = ke->target.decrypt.last_index[u];
if (sfd->crypto.params.crypto_suite
&& ke->target.decrypt.last_index[u]
- ctx->srtp_index > 0x4000)
- ctx->srtp_index > 0x4000) {
ilog(LOG_DEBUG, "Updating SRTP decryption index from %" PRIu64
" to %" PRIu64,
ctx->srtp_index,
ke->target.decrypt.last_index[u]);
ctx->srtp_index = ke->target.decrypt.last_index[u];
update = true;
}
}
mutex_unlock(&ps->in_lock);
}
@ -702,6 +713,7 @@ void call_timer(void *ptr) {
next:
g_slice_free1(sizeof(*ke), ke);
i = g_list_delete_link(i, i);
log_info_pop();
}
kill_calls_timer(hlp.del_scheduled, NULL);

@ -1599,10 +1599,10 @@ static void proc_list_crypto_print(struct seq_file *f, struct re_crypto_context
seq_printf(f, " ROC:");
for (i = 0; i < ARRAY_SIZE(c->roc); i++) {
if (i == 0)
seq_printf(f, " %u", (unsigned int) c->roc[i]);
else
seq_printf(f, ", %u", (unsigned int) c->roc[i]);
seq_printf(f, "%s %u (%lu)",
(i == 0) ? "" : ",",
(unsigned int) c->roc[i],
(unsigned long) s->last_index[i]);
}
seq_printf(f, "\n");
@ -1660,10 +1660,9 @@ static int proc_list_show(struct seq_file *f, void *v) {
for (i = 0; i < ARRAY_SIZE(g->target.ssrc); i++) {
if (!g->target.ssrc[i])
break;
if (i == 0)
seq_printf(f, " %lx", (unsigned long) ntohl(g->target.ssrc[i]));
else
seq_printf(f, ", %lx", (unsigned long) ntohl(g->target.ssrc[i]));
seq_printf(f, "%s %lx",
(i == 0) ? "" : ",",
(unsigned long) ntohl(g->target.ssrc[i]));
}
seq_printf(f, "\n");
@ -1693,10 +1692,9 @@ static int proc_list_show(struct seq_file *f, void *v) {
for (j = 0; j < ARRAY_SIZE(o->output.ssrc_out); j++) {
if (!o->output.ssrc_out[j])
break;
if (j == 0)
seq_printf(f, " %lx", (unsigned long) ntohl(o->output.ssrc_out[j]));
else
seq_printf(f, ", %lx", (unsigned long) ntohl(o->output.ssrc_out[j]));
seq_printf(f, "%s %lx",
(j == 0) ? "" : ",",
(unsigned long) ntohl(o->output.ssrc_out[j]));
}
seq_printf(f, "\n");

Loading…
Cancel
Save