Hi all, I'd like to report a bug introduced with r5781 meant to solve Ticket #2096.
With these revision, if you call pjmedia_transport_srtp_create with NULL *opt argument (like it's done in streamutil sample):
pjproject\pjsip-apps\src\samples\streamutil.c :
status = pjmedia_transport_srtp_create(med_endpt, transport, NULL, &srtp_tp);
when you get here:
pjproject\pjmedia\src\pjmedia\transport_srtp.c
if (srtp->setting.crypto_count == 0 && opt->use != PJMEDIA_SRTP_DISABLED)
you have a nullptr exception because opt pointer was never set.
I guess it was meant to be like this:
if (srtp->setting.crypto_count == 0 && srtp->setting.use != PJMEDIA_SRTP_DISABLED)
The second bug I've found using streamutil sample with srtp is that when transport_media_start in pjproject\pjmedia\src\pjmedia\transport_srtp.c gets called from pjmedia_transport_media_start that in turn was called like this:
pjproject\pjsip-apps\src\samples\streamutil.c
/* Start media transport */
pjmedia_transport_media_start(transport, 0, 0, 0, 0);
it asserts because pool, sdp_local and sdp_remote are set to 0 :
pjproject\pjmedia\src\pjmedia\transport_srtp.c:
PJ_ASSERT_RETURN(tp && pool && sdp_local && sdp_remote, PJ_EINVAL);
Thanks, bye.
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org