MT#55283 Defuse kernelize error for SRTP encryption not yet negotiated

Similar in spirit to f2d57de078, but for
the encrypt case.

Closes #2127

Change-Id: I06c82f4a1d768a863922e2240aebb6c1d243e269
(cherry picked from commit e6469c006b)
mr26.1
Alexander Bakker 7 days ago committed by Richard Fuchs
parent d435a153bf
commit 72533e9611

@ -1648,7 +1648,7 @@ static const char *kernelize_target(kernelize_state *s, struct packet_stream *st
int ret = handler->in->kernel(&reti->decrypt, stream);
if (ret) {
ilog(LOG_NOTICE, "SRTP not yet negotiated");
ilog(LOG_NOTICE, "Decryption SRTP not yet negotiated");
return NULL;
}
if (!reti->decrypt.cipher || !reti->decrypt.hmac)
@ -1881,7 +1881,14 @@ static const char *kernelize_one(kernelize_state *s,
}
}
handler->out->kernel(&redi->output.encrypt, sink);
int ret = handler->out->kernel(&redi->output.encrypt, sink);
if (ret) {
if (sink != stream)
mutex_unlock(&sink->lock);
g_free(credi);
ilog(LOG_NOTICE, "Encryption SRTP not yet negotiated");
return NULL;
}
sink_handler->rtpext->kernel(&redi->output, media, sink_media);
if (sink != stream)

Loading…
Cancel
Save