[Asterisk-code-review] res hep: Adds hostname resolution support for capture address (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Mon May 7 13:00:17 CDT 2018
Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/8932 )
Change subject: res_hep: Adds hostname resolution support for capture_address
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/8932/1/res/res_hep.c
File res/res_hep.c:
https://gerrit.asterisk.org/#/c/8932/1/res/res_hep.c@371
PS1, Line 371: static int ast_sockaddr_resolve_first_af(struct ast_sockaddr *addr,
: const char* name, int flag, int family)
: {
: struct ast_sockaddr *addrs;
: int addrs_cnt;
:
: addrs_cnt = ast_sockaddr_resolve(&addrs, name, flag, family);
: if (addrs_cnt <= 0) {
: return 1;
: }
: if (addrs_cnt > 1) {
: ast_debug(1, "Multiple addresses resolving %s, using the first one only\n", name);
: }
:
: ast_sockaddr_copy(addr, &addrs[0]);
:
: ast_free(addrs);
: return 0;
: }
I think this should just go ahead and become a common function, since it's now used in more than one place.
--
To view, visit https://gerrit.asterisk.org/8932
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I33e1a37a8b86e20505dadeda760b861a9ef51f6f
Gerrit-Change-Number: 8932
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Comment-Date: Mon, 07 May 2018 18:00:17 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180507/1262f8d7/attachment.html>
More information about the asterisk-code-review
mailing list