Skip to content

Avoid multiple inet_ntoa calls in INFO message#38

Open
perlsaiyan wants to merge 1 commit intotroglobit:masterfrom
perlsaiyan:master
Open

Avoid multiple inet_ntoa calls in INFO message#38
perlsaiyan wants to merge 1 commit intotroglobit:masterfrom
perlsaiyan:master

Conversation

@perlsaiyan
Copy link
Copy Markdown

@perlsaiyan perlsaiyan commented Jun 7, 2024

Hey troglobit, first off, thanks for the awesome little utility, I use it all the time. However, due to the two inet_ntoa calls (which return a pointer to the same string buffer) the INFO message "Connecting x:port to y:port" is wrong. See stackoverflow .

This patch grabs the string for one of the addresses in advance so the message is correct. Forgive me if I didn't handle it correctly - C isn't my best language. It closes #39 .

Vänliga hälsningar
perlsaiyan

@boussou
Copy link
Copy Markdown

boussou commented Aug 25, 2025

I fixed it for myself and sent a pull request

see #44

if you're in a hurry you can use my repo, branch "3.3" (I started from v3.3 branch)

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.

Bad INFO message in logs

2 participants