pespin submitted this change.
mgw: constify mgcp_endp_avail() param
Change-Id: I31ed2f3abbcf024ee44f62e130dd4ec01611ae97
---
M include/osmocom/mgcp/mgcp_endp.h
M src/libosmo-mgcp/mgcp_endp.c
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/osmocom/mgcp/mgcp_endp.h b/include/osmocom/mgcp/mgcp_endp.h
index 4f41818..5ecebda 100644
--- a/include/osmocom/mgcp/mgcp_endp.h
+++ b/include/osmocom/mgcp/mgcp_endp.h
@@ -138,7 +138,7 @@
const struct mgcp_trunk *trunk);
struct mgcp_endpoint *mgcp_endp_by_name(int *cause, const char *epname,
struct mgcp_config *cfg);
-bool mgcp_endp_avail(struct mgcp_endpoint *endp);
+bool mgcp_endp_avail(const struct mgcp_endpoint *endp);
void mgcp_endp_add_conn(struct mgcp_endpoint *endp, struct mgcp_conn *conn);
void mgcp_endp_remove_conn(struct mgcp_endpoint *endp, struct mgcp_conn *conn);
void mgcp_endp_free_conn_oldest(struct mgcp_endpoint *endp);
diff --git a/src/libosmo-mgcp/mgcp_endp.c b/src/libosmo-mgcp/mgcp_endp.c
index c91a00d..21df0a3 100644
--- a/src/libosmo-mgcp/mgcp_endp.c
+++ b/src/libosmo-mgcp/mgcp_endp.c
@@ -58,7 +58,7 @@
}
/* Generate E1 endpoint name from given numeric parameters */
-static char *gen_e1_epname(void *ctx, const char *domain, unsigned int trunk_nr,
+static char *gen_e1_epname(const void *ctx, const char *domain, unsigned int trunk_nr,
uint8_t ts_nr, uint8_t ss_nr)
{
unsigned int rate;
@@ -446,7 +446,7 @@
/* Check if the selected E1 endpoint is avalable, which means that none of
* the overlapping endpoints are currently serving a call. (if the system
* is properly configured such a situation should never ocurr!) */
-static bool endp_avail_e1(struct mgcp_endpoint *endp)
+static bool endp_avail_e1(const struct mgcp_endpoint *endp)
{
/* The following map shows the overlapping of the subslots and their
* respective rates. The numbers on the right running from top to bottom
@@ -552,7 +552,7 @@
/*! check if an endpoint is available for any kind of operation.
* \param[in] endp endpoint to check.
* \returns true if endpoint is avalable, false it is blocked for any reason. */
-bool mgcp_endp_avail(struct mgcp_endpoint *endp)
+bool mgcp_endp_avail(const struct mgcp_endpoint *endp)
{
switch (endp->trunk->trunk_type) {
case MGCP_TRUNK_VIRTUAL:
To view, visit change 39205. To unsubscribe, or for help writing mail filters, visit settings.