embed strings into structs
They are mostly not even as large as the talloc header used to
dynamically allocate them, and they are also not "shared" by anything.
Change-Id: I7b46d531c5d3b53984f2ce44538116973f6a074d
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 86b0d06..5249fef 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -135,10 +135,10 @@
} else {
/* Choose any of the bind addresses, preferring v6 over v4 */
bind_addr = endp->cfg->net_ports.bind_addr_v6;
- if (!bind_addr)
+ if (!strlen(bind_addr))
bind_addr = endp->cfg->net_ports.bind_addr_v4;
}
- if (bind_addr) {
+ if (strlen(bind_addr)) {
LOGPCONN(conn->conn, DRTP, LOGL_DEBUG,
"using configured rtp bind ip as local bind ip %s\n",
bind_addr);