Change in osmo-mgw[master]: libosmo-mgcp: Use trunk type during endpoint allocation

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Apr 22 20:26:28 UTC 2019


Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13738 )

Change subject: libosmo-mgcp: Use trunk type during endpoint allocation
......................................................................

libosmo-mgcp: Use trunk type during endpoint allocation

This way we prepare it to add more endpoint types in the future (osmux)
and also make it clear that E1 endpoint specifics allocation is still
missing.

Change-Id: I7633b5287a436c11f0bbbdbaef1cf59a051a2471
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 4121b9f..2acc7fd 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -1677,9 +1677,18 @@
 		tcfg->endpoints[i].cfg = tcfg->cfg;
 		tcfg->endpoints[i].tcfg = tcfg;
 
-		/* NOTE: Currently all endpoints are of type RTP, this will
-		 * change when new variations are implemented */
-		tcfg->endpoints[i].type = &ep_typeset.rtp;
+		switch (tcfg->trunk_type) {
+		case MGCP_TRUNK_VIRTUAL:
+			tcfg->endpoints[i].type = &ep_typeset.rtp;
+			break;
+		case MGCP_TRUNK_E1:
+			/* FIXME: Implement E1 allocation */
+			LOGP(DLMGCP, LOGL_FATAL, "E1 trunks not implemented!\n");
+			break;
+		default:
+			osmo_panic("Cannot allocate unimplemented trunk type %d! %s:%d\n",
+				   tcfg->trunk_type, __FILE__, __LINE__);
+		}
 	}
 
 	tcfg->number_endpoints = tcfg->vty_number_endpoints;

-- 
To view, visit https://gerrit.osmocom.org/13738
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7633b5287a436c11f0bbbdbaef1cf59a051a2471
Gerrit-Change-Number: 13738
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190422/4ac0fa36/attachment.htm>


More information about the gerrit-log mailing list