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

Include PJSIP module data in cloning pjsip_rx_data #3797

Closed
wants to merge 2 commits into from

Conversation

nanangizz
Copy link
Member

Currently pjsip_rx_data_clone() always excludes PJSIP module data field (i.e: endpt_info/mod_data) in cloning pjsip_rx_data. This PR introduce a new flag PJSIP_RX_DATA_CLONE_ENDPT_INFO to also copy that field.

pjsip/include/pjsip/sip_transport.h Outdated Show resolved Hide resolved
@nanangizz
Copy link
Member Author

Not sure if this should be merged, as copying module data can be risky. For example invite session uses module data to store SDP info, many parts of the SDP info refer to rdata buffer, so copying the invite session's module data (containing SDP info pointing to original rdata buffer) can be harmful as the original rdata may be invalid soon.

@TheQue42
Copy link

TheQue42 commented Dec 6, 2023

Ah...wrote before I found your comment. So, I guess it probably wont be merged then.

@sauwming
Copy link
Member

sauwming commented Dec 6, 2023

Yes, if it doesn't help solve the issue, IMO it's better not to merge it and close the PR. We can always revisit/reopen later when needed.

@nanangizz nanangizz closed this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants