Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pjsip 2.9 #29

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Support for pjsip 2.9 #29

wants to merge 17 commits into from

Conversation

welljsjs
Copy link

@welljsjs welljsjs commented Sep 28, 2019

This PR adds support for pjsip 2.8 & 2.9 (latest as of Sep. 28, '19).

The major change is the addition of another rtp callback.

Some commits to pjsip introduced rtp_cb2 as another struct member of pjmedia_transport_attach_param. This lead to rtp_cb become deprecated and resulted in crashes because rtp_cb was NULL. This PR fixes that issue dynamically by checking what version is being used via macros made available by pjsip (the changed was introduced in v2.8).

This change is a requirement, a must-have, for this project in order to also work with all versions of pjsip.

Side note:
I'd squash all commits as most of them are about debug output.
I also accidentally removed the patch. Lmk if you'd like me to re-add it.

This PR closes #28

Relative paths don't require us to modify the file when automatically (by a script) integrating ZRTP4PJ to projects.
- transport_rtp_cb2 calls zrtp->stream_rtp_cb2 which is received by transport_attach2 if available (otherwise, transport_rtp_cb is called which calls zrtp->stream_rtp_cb)
- Registered new callback within transport_attach2
- We probably don't need to register transport_rtp_cb2 within the old transport_attach function as transport_rtp_cb2 likely didn't exist then
(There's no "stream_rtcp_cb2")
Changed zid file name from "simple.zip" to "/tmp/simple.zip" to avoid conflicts with iOS permissions (sandboxed apps are not allowed to create files within the app folder but probably are allowed to create files within "/tmp")
...to ensure that rtp_cb2 is not used before pjsip v2.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0x0 memory read in transport_zrtp.c - support for pjsip 2.8 onwards
1 participant