pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/39205?usp=email )


Change subject: mgw: constify mgcp_endp_avail() param
......................................................................

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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/39205/1

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..4c51266 100644
--- a/src/libosmo-mgcp/mgcp_endp.c
+++ b/src/libosmo-mgcp/mgcp_endp.c
@@ -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
@@ -522,7 +522,7 @@
                        break;

                /* Pick overlapping endpoint to check */
-               epname_check = gen_e1_epname(endp, endp->trunk->cfg->domain,
+               epname_check = gen_e1_epname(NULL, endp->trunk->cfg->domain,
                                             endp->trunk->trunk_nr, ts_nr,
                                             interlock[i]);
                endp_check = mgcp_endp_find_specific(epname_check, endp->trunk);
@@ -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 https://gerrit.osmocom.org/c/osmo-mgw/+/39205?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I31ed2f3abbcf024ee44f62e130dd4ec01611ae97
Gerrit-Change-Number: 39205
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to