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
acc: Fix reason code for locally generated replies. #3137
Conversation
- Use heap memory for the reason code instead of the stack memory. - See issue kamailio#2981
src/modules/acc/acc_logic.c
Outdated
@@ -93,15 +93,18 @@ void env_set_totag(struct cell *t, struct sip_msg *reply) | |||
tmb.t_get_reply_totag(t->uas.request, &acc_env.to_tag); | |||
} | |||
|
|||
int env_set_reason(struct sip_msg *reply, str *buff) { | |||
int env_set_reason(struct sip_msg *reply, str *buff, int code) { | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't comment code, just remove it
Indeed, the code that is no longer needed must be removed, otherwise it makes it hard to understand the changes done the patch and in long term the code will become a mess. Comments should be used only to explain the code, if one wants to check a previous version, git history is the right way. |
- Code was commented out in the previous pull request. (kamailio#3137). - This has now been corrected.
Thanks! |
* acc: Fix reason code for locally generated replies. - Use heap memory for the reason code instead of the stack memory. - See issue #2981 * acc: Remove code which was commented out. - Code was commented out in the previous pull request. (#3137). - This has now been corrected. (cherry picked from commit e74cb23)
* acc: Fix reason code for locally generated replies. - Use heap memory for the reason code instead of the stack memory. - See issue #2981 * acc: Remove code which was commented out. - Code was commented out in the previous pull request. (#3137). - This has now been corrected. (cherry picked from commit e74cb23)
Pre-Submission Checklist
in
doc/
subfolder, the README file is autogenerated)Type Of Change
Checklist:
Description