Change in osmo-mgw[master]: mgcp_client: do not print (null) when address is ANY

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

laforge gerrit-no-reply at
Tue Aug 17 12:12:26 UTC 2021

laforge has submitted this change. ( )

Change subject: mgcp_client: do not print (null) when address is ANY

mgcp_client: do not print (null) when address is ANY

When the address is set to ANY, the address string is NULL. The log then
prints "(null)" where the address normaly would be. This looks odd, lets
print "(any)" instead.

Change-Id: I2ea138827ee5b9f40d352bf594364ee930520609
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 5 insertions(+), 3 deletions(-)

  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve
  daniel: Looks good to me, approved

diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 440cd96..225b1ee 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -824,7 +824,8 @@
 		/* Choose a new port number to try next */
 		     "MGCPGW failed to bind to %s:%u, retrying with port %u\n",
-		     mgcp->actual.local_addr, mgcp->actual.local_port, mgcp->actual.local_port + 1);
+		     mgcp->actual.local_addr ? mgcp->actual.local_addr : "(any)", mgcp->actual.local_port,
+		     mgcp->actual.local_port + 1);
@@ -892,8 +893,9 @@
 	if (rc < 0) {
 		     "Failed to initialize socket %s:%u -> %s:%u for MGCP GW: %s\n",
-		     mgcp->actual.local_addr, mgcp->actual.local_port,
-		     mgcp->actual.remote_addr, mgcp->actual.remote_port, strerror(errno));
+		     mgcp->actual.local_addr ? mgcp->actual.local_addr : "(any)", mgcp->actual.local_port,
+		     mgcp->actual.remote_addr ? mgcp->actual.local_addr : "(any)", mgcp->actual.remote_port,
+		     strerror(errno));
 		goto error_close_fd;

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I2ea138827ee5b9f40d352bf594364ee930520609
Gerrit-Change-Number: 25115
Gerrit-PatchSet: 9
Gerrit-Owner: dexter <pmaier at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: neels <nhofmeyr at>
Gerrit-Reviewer: osmith <osmith at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list