<p>Pau Espin Pedrol <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/13738">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">libosmo-mgcp: Use trunk type during endpoint allocation<br><br>This way we prepare it to add more endpoint types in the future (osmux)<br>and also make it clear that E1 endpoint specifics allocation is still<br>missing.<br><br>Change-Id: I7633b5287a436c11f0bbbdbaef1cf59a051a2471<br>---<br>M src/libosmo-mgcp/mgcp_protocol.c<br>1 file changed, 12 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c</span><br><span>index 4121b9f..2acc7fd 100644</span><br><span>--- a/src/libosmo-mgcp/mgcp_protocol.c</span><br><span>+++ b/src/libosmo-mgcp/mgcp_protocol.c</span><br><span>@@ -1677,9 +1677,18 @@</span><br><span>                tcfg->endpoints[i].cfg = tcfg->cfg;</span><br><span>            tcfg->endpoints[i].tcfg = tcfg;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-          /* NOTE: Currently all endpoints are of type RTP, this will</span><br><span style="color: hsl(0, 100%, 40%);">-              * change when new variations are implemented */</span><br><span style="color: hsl(0, 100%, 40%);">-                tcfg->endpoints[i].type = &ep_typeset.rtp;</span><br><span style="color: hsl(120, 100%, 40%);">+             switch (tcfg->trunk_type) {</span><br><span style="color: hsl(120, 100%, 40%);">+                case MGCP_TRUNK_VIRTUAL:</span><br><span style="color: hsl(120, 100%, 40%);">+                      tcfg->endpoints[i].type = &ep_typeset.rtp;</span><br><span style="color: hsl(120, 100%, 40%);">+                     break;</span><br><span style="color: hsl(120, 100%, 40%);">+                case MGCP_TRUNK_E1:</span><br><span style="color: hsl(120, 100%, 40%);">+                   /* FIXME: Implement E1 allocation */</span><br><span style="color: hsl(120, 100%, 40%);">+                  LOGP(DLMGCP, LOGL_FATAL, "E1 trunks not implemented!\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                   break;</span><br><span style="color: hsl(120, 100%, 40%);">+                default:</span><br><span style="color: hsl(120, 100%, 40%);">+                      osmo_panic("Cannot allocate unimplemented trunk type %d! %s:%d\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                             tcfg->trunk_type, __FILE__, __LINE__);</span><br><span style="color: hsl(120, 100%, 40%);">+          }</span><br><span>    }</span><br><span> </span><br><span>        tcfg->number_endpoints = tcfg->vty_number_endpoints;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13738">change 13738</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13738"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I7633b5287a436c11f0bbbdbaef1cf59a051a2471 </div>
<div style="display:none"> Gerrit-Change-Number: 13738 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>