endp: do not cache cfg pointer
There is no obvious reason why we would want to complicate the code by
caching pointers, since pointer traversal is probably not a performance
bottleneck, and if it is we should rather take a look at our dozens of
linked lists first..
Change-Id: I2456ba63598f76200d53e00223abf60bb36a49c0
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index 8f0a906..de19042 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -116,7 +116,7 @@
osmux_handle_alloc(struct mgcp_conn_rtp *conn, struct in_addr *addr, int rem_port)
{
struct osmux_handle *h;
- struct mgcp_config *cfg = conn->conn->endp->cfg;
+ struct mgcp_config *cfg = conn->conn->endp->trunk->cfg;
h = talloc_zero(osmux, struct osmux_handle);
if (!h)
@@ -460,7 +460,7 @@
*/
struct in6_addr addr_unset = {};
static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);
- uint16_t osmux_dummy = endp->cfg->osmux_dummy;
+ uint16_t osmux_dummy = endp->trunk->cfg->osmux_dummy;
/* Check if osmux is enabled for the specified connection */
if (conn->osmux.state != OSMUX_STATE_ACTIVATING) {