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
pull/1126/merge
Alexander Bakker 6 days ago committed by Richard Fuchs
parent 47371520ee
commit e6469c006b

@ -1640,7 +1640,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)
@ -1873,7 +1873,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