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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/19118 ) Change subject: mgcp_endp: use define constant to define max number of E1 subslots ...................................................................... mgcp_endp: use define constant to define max number of E1 subslots There are 15 possible subslots (not all at the same time) in one E1 timeslot. Lets use a define constant for that. Change-Id: If7cb74e486946aff09e22abf8a8885bf0693f34e Related: OS#2547 --- M include/osmocom/mgcp/mgcp_endp.h M src/libosmo-mgcp/mgcp_endp.c 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/18/19118/1 diff --git a/include/osmocom/mgcp/mgcp_endp.h b/include/osmocom/mgcp/mgcp_endp.h index a58053a..879947b 100644 --- a/include/osmocom/mgcp/mgcp_endp.h +++ b/include/osmocom/mgcp/mgcp_endp.h @@ -27,6 +27,9 @@ struct mgcp_conn; struct mgcp_endpoint; +/* Number of E1 subslots (different variants, not all useable at the same time) */ +#define MGCP_ENDP_E1_SUBSLOTS 15 + #define LOGPENDP(endp, cat, level, fmt, args...) \ LOGP(cat, level, "endpoint:%s " fmt, \ endp ? endp->name : "none", \ diff --git a/src/libosmo-mgcp/mgcp_endp.c b/src/libosmo-mgcp/mgcp_endp.c index 82f7732..eac5832 100644 --- a/src/libosmo-mgcp/mgcp_endp.c +++ b/src/libosmo-mgcp/mgcp_endp.c @@ -119,7 +119,7 @@ endp->type = &ep_typeset.rtp; endp->name = gen_e1_epname(endp, trunk->cfg->domain, trunk->trunk_nr, - index / 15, index % 15); + index / MGCP_ENDP_E1_SUBSLOTS, index % MGCP_ENDP_E1_SUBSLOTS); break; default: osmo_panic("Cannot allocate unimplemented trunk type %d! %s:%d\n", @@ -524,7 +524,7 @@ * endpoint we need to verify, only the overlaps need to be checked. This is * also the reason why the related subslot number is missing from each each * line. */ - const int8_t interlock_tab[15][16] = + const int8_t interlock_tab[MGCP_ENDP_E1_SUBSLOTS][16] = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1 }, { 0, 3, 4, 7, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 5, 6, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, -1 }, -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/19118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: If7cb74e486946aff09e22abf8a8885bf0693f34e Gerrit-Change-Number: 19118 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200703/4380f586/attachment.htm>