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_vty.c b/src/libosmo-mgcp/mgcp_vty.c
index 738bfcc..a05733f 100644
--- a/src/libosmo-mgcp/mgcp_vty.c
+++ b/src/libosmo-mgcp/mgcp_vty.c
@@ -218,7 +218,7 @@
 		vty_out(vty, "   CONN: %s%s", mgcp_conn_dump(conn), VTY_NEWLINE);
 
 		if (show_stats) {
-			if (endp->cfg->conn_timeout) {
+			if (endp->trunk->cfg->conn_timeout) {
 				struct timeval remaining;
 				osmo_timer_remaining(&conn->watchdog, NULL, &remaining);
 				vty_out(vty, "   Currently remaining timeout (seconds): %d.%06d%s",