Change in osmo-mgw[master]: embed strings into structs

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

pespin gerrit-no-reply at
Fri Sep 10 11:32:13 UTC 2021

pespin has posted comments on this change. ( )

Change subject: embed strings into structs

Patch Set 9:


strlen party!!!! Let's rename MGW to SCW: String Counting Gateway 
File include/osmocom/mgcp/mgcp.h: 
PS9, Line 97: 	/* addr or NULL to fall-back to default */
"addr or empty" 
File src/libosmo-mgcp/mgcp_network.c: 
PS9, Line 138: 		if (!strlen(bind_addr))
bind_addr[0] == '\0' 
PS9, Line 141: 	if (strlen(bind_addr)) {
bind_addr[0] != '\0' 
File src/libosmo-mgcp/mgcp_protocol.c: 
PS9, Line 276: 	const char *addr = strlen(endp->cfg->local_ip) ? endp->cfg->local_ip : conn->end.local_addr;
endp->cfg->local_ip[0] != '\0'

We have better stuff to do than counting lengths of strings everywhere for no good use. 
File src/libosmo-mgcp/mgcp_vty.c: 
PS9, Line 68: 	if (strlen(g_cfg->local_ip))
[0] != '\0' 
PS9, Line 75: 	if (strlen(g_cfg->net_ports.bind_addr_v4))
PS9, Line 78: 	if (strlen(g_cfg->net_ports.bind_addr_v6))
PS9, Line 1749: 	if (!strlen(g_cfg->source_addr)) {
File src/osmo-mgw/mgw_main.c: 
PS9, Line 372: 	if (strlen(cfg->call_agent_addr))
PS9, Line 377: 				cfg->call_agent_addr, strlen(cfg->call_agent_addr) ? 2727 : 0, flags);

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I7b46d531c5d3b53984f2ce44538116973f6a074d
Gerrit-Change-Number: 25426
Gerrit-PatchSet: 9
Gerrit-Owner: Hoernchen <ewild at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at>
Gerrit-CC: pespin <pespin at>
Gerrit-Comment-Date: Fri, 10 Sep 2021 11:32:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list