Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/5532/1/src/hnbgw_vty.c
File src/hnbgw_vty.c:

Line 120:       
whitespace


Line 151:     vty_out(vty, "%s:%u", inet_ntoa(addr.sin_addr), addr.sin_port);
please don't introduce new IPv4-only-isms without good reason.  Using inet_ntop 
would have not been any more difficult but more future proof.

Also, we do have osmo_sock_get_name() in libosmocore/socket.c, which performs 
both getosckname and getpeername and provides you with a nice string 
representation.  This is what's used in other places already, so I'd appreciate 
if we could use it here, too.

If you really need only the local address, please refactor osmo_sock_get_name() 
in libosmocore and use it from here.


-- 
To view, visit https://gerrit.osmocom.org/5532
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c937306a011715e163a40bc8ef8ec7e8d4e5d08
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes

Reply via email to