This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Hoernchen gerrit-no-reply at lists.osmocom.orgHoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/25429 ) Change subject: rename strip_epname and find_specific_endpoint and make them available ...................................................................... rename strip_epname and find_specific_endpoint and make them available Change-Id: I4f76676640a308ab84da3848e1c1ec22bd5d9566 --- M include/osmocom/mgcp/mgcp_endp.h M src/libosmo-mgcp/mgcp_endp.c 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/29/25429/1 diff --git a/include/osmocom/mgcp/mgcp_endp.h b/include/osmocom/mgcp/mgcp_endp.h index b8796c1..91c4551 100644 --- a/include/osmocom/mgcp/mgcp_endp.h +++ b/include/osmocom/mgcp/mgcp_endp.h @@ -136,3 +136,7 @@ bool mgcp_endp_avail(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_strip_name(char *epname_stripped, const char *epname, + const struct mgcp_trunk *trunk); +struct mgcp_endpoint *mgcp_endp_find_specific(const char *epname, + const struct mgcp_trunk *trunk); diff --git a/src/libosmo-mgcp/mgcp_endp.c b/src/libosmo-mgcp/mgcp_endp.c index 19446ce..9846dfe 100644 --- a/src/libosmo-mgcp/mgcp_endp.c +++ b/src/libosmo-mgcp/mgcp_endp.c @@ -192,7 +192,7 @@ * to the memory pointed at by epname_stripped. The expected size of the * result is either equal or lower then the length of the input string * (epname) */ -static void strip_epname(char *epname_stripped, const char *epname, +void mgcp_endp_strip_name(char *epname_stripped, const char *epname, const struct mgcp_trunk *trunk) { osmo_str_tolower_buf(epname_stripped, MGCP_ENDPOINT_MAXLEN, epname); @@ -221,7 +221,7 @@ /* Find an endpoint specified by its name. If the endpoint can not be found, * return NULL */ -static struct mgcp_endpoint *find_specific_endpoint(const char *epname, +struct mgcp_endpoint *mgcp_endp_find_specific(const char *epname, const struct mgcp_trunk *trunk) { char epname_stripped[MGCP_ENDPOINT_MAXLEN]; @@ -230,11 +230,11 @@ unsigned int i; /* Strip irrelevant information from the endpoint name */ - strip_epname(epname_stripped, epname, trunk); + mgcp_endp_strip_name(epname_stripped, epname, trunk); for (i = 0; i < trunk->number_endpoints; i++) { endp = trunk->endpoints[i]; - strip_epname(epname_stripped_endp, endp->name, trunk); + mgcp_endp_strip_name(epname_stripped_endp, endp->name, trunk); if (strcmp(epname_stripped_endp, epname_stripped) == 0) return endp; } @@ -289,7 +289,7 @@ /* Find an endpoint by its name (if wildcarded request is not * applicable) */ - endp = find_specific_endpoint(epname, trunk); + endp = mgcp_endp_find_specific(epname, trunk); if (endp) { LOGPENDP(endp, DLMGCP, LOGL_DEBUG, "(trunk:%d) found endpoint: %s\n", @@ -540,7 +540,7 @@ epname_check = gen_e1_epname(endp, endp->trunk->cfg->domain, endp->trunk->trunk_nr, ts_nr, interlock[i]); - endp_check = find_specific_endpoint(epname_check, endp->trunk); + endp_check = mgcp_endp_find_specific(epname_check, endp->trunk); if (!endp_check) { LOGPENDP(endp, DLMGCP, LOGL_ERROR, "cannot check endpoint availability, overlapping endpoint:%s not found!\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/25429 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I4f76676640a308ab84da3848e1c1ec22bd5d9566 Gerrit-Change-Number: 25429 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210909/3ce78483/attachment.htm>