diff options
author | Kirill Zakharenko <earwin@gmail.com> | 2020-05-06 03:09:06 +0300 |
---|---|---|
committer | Kirill Zakharenko <earwin@gmail.com> | 2020-05-06 03:09:06 +0300 |
commit | 31e657bcb4f56208d8aeea0248af55cb2120c4e1 (patch) | |
tree | 61dd2e3b2af0db690c55582b771ef37597e0b219 | |
parent | 06a732e1fa959cb202b037002e6a2a063ee723c8 (diff) | |
parent | 63866009e2db2aba4dfa30515f8e7f5032e5c89e (diff) |
Merge master into fairwaves/production
-rw-r--r-- | include/osmocom/mgcp/mgcp.h | 1 | ||||
-rw-r--r-- | src/libosmo-mgcp/mgcp_protocol.c | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 73172f5f6..43f480e7e 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -122,6 +122,7 @@ struct mgcp_port_range { /* Global MCGP general rate counters */ enum { MGCP_GENERAL_RX_MSGS_TOTAL, + MGCP_GENERAL_RX_MSGS_RETRANSMITTED, MGCP_GENERAL_RX_MSGS_HANDLED, MGCP_GENERAL_RX_MSGS_UNHANDLED, MGCP_GENERAL_RX_FAIL_MSG_PARSE, diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 3fdf5033b..82c10aa8a 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -54,11 +54,13 @@ struct mgcp_request { { .name = NAME, .handle_request = REQ, .debug_name = DEBUG_NAME }, static const struct rate_ctr_desc mgcp_general_ctr_desc[] = { - [MGCP_GENERAL_RX_MSGS_TOTAL] = {"mgcp:rx_msgs", "Total number of MGCP messages received."}, - [MGCP_GENERAL_RX_MSGS_HANDLED] = {"mgcp:rx_msgs_handled", "Number of handled MGCP messages."}, - [MGCP_GENERAL_RX_MSGS_UNHANDLED] = {"mgcp:rx_msgs_unhandled", "Number of unhandled MGCP messages."}, + /* rx_msgs = rx_msgs_retransmitted + rx_msgs_handled + rx_msgs_unhandled + err_rx_msg_parse + err_rx_no_endpoint */ + [MGCP_GENERAL_RX_MSGS_TOTAL] = {"mgcp:rx_msgs", "total number of MGCP messages received."}, + [MGCP_GENERAL_RX_MSGS_RETRANSMITTED] = {"mgcp:rx_msgs_retransmitted", "number of received retransmissions."}, + [MGCP_GENERAL_RX_MSGS_HANDLED] = {"mgcp:rx_msgs_handled", "number of handled MGCP messages."}, + [MGCP_GENERAL_RX_MSGS_UNHANDLED] = {"mgcp:rx_msgs_unhandled", "number of unhandled MGCP messages."}, [MGCP_GENERAL_RX_FAIL_MSG_PARSE] = {"mgcp:err_rx_msg_parse", "error parsing MGCP message."}, - [MGCP_GENERAL_RX_FAIL_NO_ENDPOINT] = {"mgcp:err_rx_no_endpoint", "can't find MGCP endpoint."}, + [MGCP_GENERAL_RX_FAIL_NO_ENDPOINT] = {"mgcp:err_rx_no_endpoint", "can't find MGCP endpoint, probably we've used all allocated endpoints."}, }; const static struct rate_ctr_group_desc mgcp_general_ctr_group_desc = { @@ -419,6 +421,7 @@ struct msgb *mgcp_handle_message(struct mgcp_config *cfg, struct msgb *msg) if (pdata.endp && pdata.trans && pdata.endp->last_trans && strcmp(pdata.endp->last_trans, pdata.trans) == 0) { + rate_ctr_inc(&rate_ctrs->ctr[MGCP_GENERAL_RX_MSGS_RETRANSMITTED]); return do_retransmission(pdata.endp); } |