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

usrloc: simplify processing of the refresh events #3264

Merged
merged 1 commit into from
May 7, 2024

Conversation

sobomax
Copy link
Contributor

@sobomax sobomax commented Dec 3, 2023

Summary

usrloc: simplify processing of the refresh events

Details

The code that generates refresh event tries to use sock_info* available in the contact structure to pass sock_str over. This requires allocating sock_info as well as setting up appropriate pointers.

Solution

Do not abuse "struct socket_info" just to pass sock_str over. Instead, add str to the refresh event data and pass that alone. Not only it reduces amount of data to pass, but also makes code much easier to read and understand.

Compatibility

None

Closing issues

Nope

Do not abuse "struct socket_info" just to pass sock_str over.
Instead, add str to the refresh event data and pass that alone.
Not only it reduces amount of data to pass, but also makes
code much easier to read and understand.
@liviuchircu liviuchircu merged commit 5e7be56 into OpenSIPS:master May 7, 2024
44 checks passed
@liviuchircu
Copy link
Member

LGTM @sobomax -- a very useful refactoring!

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.

2 participants