[Asterisk-code-review] http.c: Minor simplification to HTTP status output. (asterisk[master])

Friendly Automation asteriskteam at digium.com
Thu Mar 16 07:21:36 CDT 2023


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19782 )

Change subject: http.c: Minor simplification to HTTP status output.
......................................................................

http.c: Minor simplification to HTTP status output.

Change the HTTP status page (located at /httpstatus by default) by:

* Combining the address and port into a single line.
* Changing "SSL" to "TLS"

ASTERISK-30433 #close

Change-Id: Id2ccb1218f00a68424aca2b651647d8b1f549bcb
---
A doc/CHANGES-staging/http_bindaddr.txt
M main/http.c
2 files changed, 25 insertions(+), 5 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Boris P. Korzun: Looks good to me, but someone else must approve
  Friendly Automation: Approved for Submit




diff --git a/doc/CHANGES-staging/http_bindaddr.txt b/doc/CHANGES-staging/http_bindaddr.txt
new file mode 100644
index 0000000..e83312b
--- /dev/null
+++ b/doc/CHANGES-staging/http_bindaddr.txt
@@ -0,0 +1,6 @@
+Subject: http
+Master-Only: True
+
+For bound addresses, the HTTP status page now combines the bound
+address and bound port in a single line. Additionally, the SSL bind
+address has been renamed to TLS.
diff --git a/main/http.c b/main/http.c
index 80c00c5..c07a898 100644
--- a/main/http.c
+++ b/main/http.c
@@ -398,13 +398,11 @@
 	ast_str_append(&out, 0, "<tr><td><i>Prefix</i></td><td><b>%s</b></td></tr>\r\n", prefix);
 	if (global_http_server) {
 		ast_str_append(&out, 0, "<tr><td><i>Bind Address</i></td><td><b>%s</b></td></tr>\r\n",
-			       ast_sockaddr_stringify_addr(&global_http_server->args.old_address));
-		ast_str_append(&out, 0, "<tr><td><i>Bind Port</i></td><td><b>%s</b></td></tr>\r\n",
-			       ast_sockaddr_stringify_port(&global_http_server->args.old_address));
+			       ast_sockaddr_stringify(&global_http_server->args.old_address));
 	}
 	if (http_tls_cfg.enabled) {
-		ast_str_append(&out, 0, "<tr><td><i>SSL Bind Port</i></td><td><b>%s</b></td></tr>\r\n",
-			       ast_sockaddr_stringify_port(&https_desc.old_address));
+		ast_str_append(&out, 0, "<tr><td><i>TLS Bind Address</i></td><td><b>%s</b></td></tr>\r\n",
+			       ast_sockaddr_stringify(&https_desc.old_address));
 	}
 	ast_str_append(&out, 0, "<tr><td colspan=\"2\"><hr></td></tr>\r\n");
 	for (v = get_vars; v; v = v->next) {

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19782
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Id2ccb1218f00a68424aca2b651647d8b1f549bcb
Gerrit-Change-Number: 19782
Gerrit-PatchSet: 4
Gerrit-Owner: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Reviewer: Boris P. Korzun <drtr0jan at yandex.ru>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-CC: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230316/9b4ac1fd/attachment.html>


More information about the asterisk-code-review mailing list