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

acc: Fix reason code for locally generated replies. #3137

Merged
merged 3 commits into from Jun 22, 2022

Conversation

CFrits
Copy link
Contributor

@CFrits CFrits commented Jun 7, 2022

Pre-Submission Checklist

  • Commit message has the format required by CONTRIBUTING guide
  • Commits are split per component (core, individual modules, libs, utils, ...)
  • Each component has a single commit (if not, squash them into one commit)
  • No commits to README files for modules (changes must be done to docbook files
    in doc/ subfolder, the README file is autogenerated)

Type Of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)

Checklist:

Description

- Use heap memory for the reason code instead of the stack memory.
- See issue kamailio#2981
@@ -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) {
/*
Copy link
Member

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

@miconda
Copy link
Member

miconda commented Jun 14, 2022

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.
@CFrits CFrits marked this pull request as draft June 21, 2022 16:41
@miconda
Copy link
Member

miconda commented Jun 22, 2022

Thanks!

@miconda miconda marked this pull request as ready for review June 22, 2022 19:50
@miconda miconda merged commit e74cb23 into kamailio:master Jun 22, 2022
miconda pushed a commit that referenced this pull request Jun 24, 2022
* 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)
henningw pushed a commit that referenced this pull request Nov 28, 2022
* 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)
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

3 participants