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

tm: fake msg and environment to append new branches #346

Merged
merged 1 commit into from Oct 7, 2015

Conversation

grumvalski
Copy link
Contributor

This fix tries to solve the crash reported in http://lists.sip-router.org/pipermail/sr-users/2015-September/089846.html. The cause of the crash was that the sip message used to append branch was the shmem clone of the original message. When the new branches were going through their configured branch route, modifications done by other modules' function (like rtpproxy) were applied to this stored copy directly, causing the crash once a failure route was run.
This patch take the same approach as the failure handler one, creating a fake request from the origin message and using this one to append branches. I am not sure if this is a good approach, since the appended branch are going through the branch route and some function called there could not be compatible with a faked request.

@miconda
Copy link
Member

miconda commented Sep 28, 2015

Not much time available today, but I am going to check it sometime soon.

@miconda
Copy link
Member

miconda commented Oct 7, 2015

Can be merged.

Anyhow, wondering if would be just enough to use a local temporary msg structure, will be simpler, but then if branch route is executed, some context attributes won't be there... I will try to analyze a bit more the whole concept with faking the environment, because sometimes could be just too complex for what exactly is needed.

@grumvalski
Copy link
Contributor Author

Thanks for looking at it Daniel. If you prefer I can wait your analysis before merging.

@miconda
Copy link
Member

miconda commented Oct 7, 2015

If it fixes things now, merge it, refactoring can be done later.

Overall, is about not getting to fake the env too many times if same env can be re-used -- again, I need to look at other parts, it actually may not be the case for this situation.

grumvalski added a commit that referenced this pull request Oct 7, 2015
tm: fake msg and environment to append new branches
@grumvalski grumvalski merged commit 3de200b into kamailio:master Oct 7, 2015
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.

None yet

2 participants