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

[SITL] consolidate IP helpers into target.c #9080

Merged
merged 2 commits into from
May 29, 2023
Merged

Conversation

stronnag
Copy link
Collaborator

  • Replace duplicated address lookup function
  • Replace similar / duplicated address formatting functions
  • Untabify iaw style guide

@stronnag
Copy link
Collaborator Author

Avoids allocations, seems to be reasonable ...

$ ./lookup_addr --host tigger
Buf : 62
Searching tigger 6666
[0] V6: [2axx:8xxx:xxx7:0:1xxd:axxx:fxxx:cxxx]:6666
[1] V4: 172.31.0.139:6666
Print fails <--- too small buffer size provided

@mmosca
Copy link
Collaborator

mmosca commented May 28, 2023

Looks good. The allocation was a minor issue.

@stronnag stronnag merged commit 1dcb9b3 into master May 29, 2023
sensei-hacker pushed a commit to sensei-hacker/inav_unofficial_targets that referenced this pull request Oct 4, 2023
* [SITL] consolidate IP helpers in target.c

* avoid memory allocation in prettyprint
@DzikuVx DzikuVx deleted the jh_consolidate_ip_helpers branch December 8, 2023 09:24
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