[Asterisk-code-review] chan_iax2: Fix perceived showing host address. (asterisk[master])
Friendly Automation
asteriskteam at digium.com
Fri Mar 25 17:32:39 CDT 2022
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18196 )
Change subject: chan_iax2: Fix perceived showing host address.
......................................................................
chan_iax2: Fix perceived showing host address.
ASTERISK_22025 introduced a regression that shows
the host IP and port as the perceived IP and port
again, as opposed to showing the actual perceived
address. This fixes this by showing the correct
information.
ASTERISK-29048 #close
Change-Id: I0ad3e25bc6b449e83ce72ea5d1a1cdba72aa304a
---
M channels/chan_iax2.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Benjamin Keith Ford: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index ecf5074..6e2aa3b 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -7375,7 +7375,7 @@
AST_LIST_TRAVERSE(®istrations, reg, entry) {
snprintf(host, sizeof(host), "%s", ast_sockaddr_stringify(®->addr));
- snprintf(perceived, sizeof(perceived), "%s", ast_sockaddr_isnull(®->addr) ? "<Unregistered>" : ast_sockaddr_stringify(®->addr));
+ snprintf(perceived, sizeof(perceived), "%s", ast_sockaddr_isnull(®->us) ? "<Unregistered>" : ast_sockaddr_stringify(®->us));
ast_cli(a->fd, FORMAT, host,
(reg->dnsmgr) ? "Y" : "N",
@@ -7407,7 +7407,7 @@
AST_LIST_TRAVERSE(®istrations, reg, entry) {
snprintf(host, sizeof(host), "%s", ast_sockaddr_stringify(®->addr));
- snprintf(perceived, sizeof(perceived), "%s", ast_sockaddr_isnull(®->addr) ? "<Unregistered>" : ast_sockaddr_stringify(®->addr));
+ snprintf(perceived, sizeof(perceived), "%s", ast_sockaddr_isnull(®->us) ? "<Unregistered>" : ast_sockaddr_stringify(®->us));
astman_append(s,
"Event: RegistryEntry\r\n"
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18196
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I0ad3e25bc6b449e83ce72ea5d1a1cdba72aa304a
Gerrit-Change-Number: 18196
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220325/8cf7721c/attachment-0001.html>
More information about the asterisk-code-review
mailing list