Change in libosmocore[master]: add osmo_sock_get_{local, remote}_ip{, _port}()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Oct 25 17:57:51 UTC 2018


Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/11455 )

Change subject: add osmo_sock_get_{local,remote}_ip{,_port}()
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/11455/1/include/osmocom/core/socket.h
File include/osmocom/core/socket.h:

https://gerrit.osmocom.org/#/c/11455/1/include/osmocom/core/socket.h@59
PS1, Line 59: char *osmo_sock_get_name2(void *ctx, int fd, bool local, bool port);
> I thought that was necessary to use it with the defines below. […]
just don't try to prematurely optimzie with #defines and make those defines below public functions/symbols.  at that point you can have the osmo_sock_get_name2() function static and not declare it in the header here.


https://gerrit.osmocom.org/#/c/11455/1/src/socket.c
File src/socket.c:

https://gerrit.osmocom.org/#/c/11455/1/src/socket.c@712
PS1, Line 712: talloc_strdup(ctx, port ? portbuf : hostbuf)
I thought the point was that you wanted to avoid returning a heap-allocated buffer with those new functions?



-- 
To view, visit https://gerrit.osmocom.org/11455
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6803c204771c59a2002bc6a0e6b79c83c35f87e1
Gerrit-Change-Number: 11455
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-CC: Max <msuraev at sysmocom.de>
Gerrit-Comment-Date: Thu, 25 Oct 2018 17:57:51 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181025/603491fe/attachment.htm>


More information about the gerrit-log mailing list