[Asterisk-code-review] res/res pjsip: Fix crash due to misuse of session->media bet... (asterisk[13])

Joshua C. Colp asteriskteam at digium.com
Fri Jan 11 08:17:28 CST 2019


Joshua C. Colp has posted comments on this change. ( https://gerrit.asterisk.org/10601 )

Change subject: res/res_pjsip: Fix crash due to misuse of session->media between threads.
......................................................................


Patch Set 5: Code-Review-1

This vastly changes the ownership and lifecycle of the session media for T.38. Is there a specific reason you opted to change things so much?

Would the following work:

In t38_initialize_session create the datastore and save the given session_media with a reference.
The datastore free would just call ao2_cleanup on it when the datastore went away.
In the places where the session_media is located using ao2_find get it using the datastore instead.

This would maintain simplify the implementation, not have to expose things, and not have to handle allocation and such (as that belongs to res_pjsip_session).

Was this originally tried and did not work?


-- 
To view, visit https://gerrit.asterisk.org/10601
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia92e2389b8d804bf205473e92ec06217e87ce237
Gerrit-Change-Number: 10601
Gerrit-PatchSet: 5
Gerrit-Owner: Paulo Vicentini <paulo.vicentini at gmail.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Paulo Vicentini <paulo.vicentini at gmail.com>
Gerrit-Reviewer: Torrey Searle <tsearle at gmail.com>
Gerrit-Comment-Date: Fri, 11 Jan 2019 14:17:28 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190111/b71df770/attachment.html>


More information about the asterisk-code-review mailing list