From 5001a02d4455851d7855f595c4ca800c1175e1ba Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 7 Aug 2020 13:04:42 -0400 Subject: [PATCH] TT#88750 fix SRTP not working after Redis restart Change-Id: I40a20b2cd2668480d4b85de7a19c39f606b2eada --- daemon/call.c | 2 +- daemon/redis.c | 2 ++ include/call.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index f7cdf21ac..b42fe5d49 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1056,7 +1056,7 @@ void call_media_state_machine(struct call_media *m) { call_stream_state_machine(l->data); } -static int __init_stream(struct packet_stream *ps) { +int __init_stream(struct packet_stream *ps) { struct call_media *media = ps->media; struct call *call = ps->call; int dtls_active = -1; diff --git a/daemon/redis.c b/daemon/redis.c index f0e35f414..4c7177435 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -1440,6 +1440,8 @@ static int json_link_streams(struct call *c, struct redis_list *streams, if (ps->media) __rtp_stats_update(ps->rtp_stats, ps->media->codecs_recv); + + __init_stream(ps); } return 0; diff --git a/include/call.h b/include/call.h index 23ec07dd8..01cfc0da0 100644 --- a/include/call.h +++ b/include/call.h @@ -452,6 +452,7 @@ void add_total_calls_duration_in_interval(struct timeval *interval_tv); void payload_type_free(struct rtp_payload_type *p); void __rtp_stats_update(GHashTable *dst, GHashTable *src); +int __init_stream(struct packet_stream *ps); const struct rtp_payload_type *__rtp_stats_codec(struct call_media *m);