aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_osmux.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@soleta.eu>2014-09-04 17:25:16 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-09-16 14:32:37 +0200
commit115e81ee19483b49ff0df2b3ea28eb19cbd92d56 (patch)
tree0ae9aadbcf23ab7d8060820c11bf35d2f8015319 /openbsc/src/libmgcp/mgcp_osmux.c
parent1abfdc218e044b764b385921be921aa05364bf47 (diff)
osmux: account extracted traffic from the osmux batch
Use struct mgcp_rtp_end statistics to account the RTP messages that has been extracted from the osmux batch and transmitted.
Diffstat (limited to 'openbsc/src/libmgcp/mgcp_osmux.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index c285de49..0fa7b450 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -216,6 +216,9 @@ static void scheduled_tx_net_cb(struct msgb *msg, void *data)
.sin_port = endp->net_end.rtp_port,
};
+ endp->bts_end.octets += msg->len;
+ endp->bts_end.packets++;
+
mgcp_send(endp, MGCP_DEST_NET, 1, &addr, (char *)msg->data, msg->len);
msgb_free(msg);
}
@@ -228,6 +231,9 @@ static void scheduled_tx_bts_cb(struct msgb *msg, void *data)
.sin_port = endp->bts_end.rtp_port,
};
+ endp->net_end.octets += msg->len;
+ endp->net_end.packets++;
+
mgcp_send(endp, MGCP_DEST_BTS, 1, &addr, (char *)msg->data, msg->len);
msgb_free(msg);
}