mgcp_protocol: log when endpoint is unavailable
When endpoints become unavailable when MDCX/CRCX/DLCX are executed on
them a major problem may be the cause, lets make sure that those events
are logged.
Change-Id: I059b7e29f960e75a53bfb5dfb2b83ab3d79e84f3
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 6a533c3..4dc0f55 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -748,6 +748,8 @@
LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "CRCX: creating new connection ...\n");
if (!mgcp_endp_avail(endp)) {
rate_ctr_inc(&rate_ctrs->ctr[MGCP_CRCX_FAIL_AVAIL]);
+ LOGPENDP(endp, DLMGCP, LOGL_ERROR,
+ "CRCX: selected endpoint not available!\n");
return create_err_response(NULL, 501, "CRCX", p->trans);
}
@@ -1017,6 +1019,8 @@
if (!mgcp_endp_avail(endp)) {
rate_ctr_inc(&rate_ctrs->ctr[MGCP_MDCX_FAIL_AVAIL]);
+ LOGPENDP(endp, DLMGCP, LOGL_ERROR,
+ "MDCX: selected endpoint not available!\n");
return create_err_response(NULL, 501, "MDCX", p->trans);
}
@@ -1243,6 +1247,8 @@
if (!mgcp_endp_avail(endp)) {
rate_ctr_inc(&rate_ctrs->ctr[MGCP_DLCX_FAIL_AVAIL]);
+ LOGPENDP(endp, DLMGCP, LOGL_ERROR,
+ "DLCX: selected endpoint not available!\n");
return create_err_response(NULL, 501, "DLCX", p->trans);
}