From ac04d8d55e413d49ef0a9179bccf1147e6f2a87a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 13 Nov 2012 21:54:36 +0100 Subject: nat: Name the variable more properly and begin with net.1.bsc.%d We can identify the NAT and BSC given the types of the variable, no need to put them into the value itself. --- openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c') diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c index 226486c32..85f940b49 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c @@ -435,10 +435,11 @@ static void handle_dlcx_response(struct bsc_connection *bsc, struct msgb *msg, } cmd->id = "0"; - cmd->variable = "nat.call_stats.v2"; + cmd->variable = talloc_asprintf(cmd, "net.0.bsc.%d.call_stats.v2", + bsc->cfg->nr); cmd->reply = talloc_asprintf(cmd, - "bsc_id=%d,mg_ip_addr=%s,mg_port=%d,", - bsc->cfg->nr, inet_ntoa(stat->net_addr), + "mg_ip_addr=%s,mg_port=%d,", + inet_ntoa(stat->net_addr), stat->net_rtp_port); cmd->reply = talloc_asprintf_append(cmd->reply, "endpoint_ip_addr=%s,endpoint_port=%d,", -- cgit v1.2.3