<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/17271">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">virtual: Fix VTY commands to specify GSMTAP multicast groups<br><br>osmo-bts-virtual uses GSMTAP over multicast groups to communicate<br>with one or more virtphy instances.  There are some well-known default<br>multicast groups, but those can also be overridden via the VTY.<br><br>The problem is: If you actually try that, osmo-bts-virtual will abort,<br>as we try to talloc_free() when using osmo_talloc_replace_string()<br>on the constant default string.<br><br>The proper solution is to talloc_strdup() the constant default string<br>when setting the default value in bts_model_phy_link_set_defaults().<br><br>Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411<br>---<br>M src/osmo-bts-virtual/main.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/71/17271/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bts-virtual/main.c b/src/osmo-bts-virtual/main.c</span><br><span>index c329f3a..02b7ae9 100644</span><br><span>--- a/src/osmo-bts-virtual/main.c</span><br><span>+++ b/src/osmo-bts-virtual/main.c</span><br><span>@@ -119,9 +119,9 @@</span><br><span> </span><br><span> void bts_model_phy_link_set_defaults(struct phy_link *plink)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        plink->u.virt.bts_mcast_group = DEFAULT_BTS_MCAST_GROUP;</span><br><span style="color: hsl(120, 100%, 40%);">+   plink->u.virt.bts_mcast_group = talloc_strdup(plink, DEFAULT_BTS_MCAST_GROUP);</span><br><span>    plink->u.virt.bts_mcast_port = DEFAULT_BTS_MCAST_PORT;</span><br><span style="color: hsl(0, 100%, 40%);">-       plink->u.virt.ms_mcast_group = DEFAULT_MS_MCAST_GROUP;</span><br><span style="color: hsl(120, 100%, 40%);">+     plink->u.virt.ms_mcast_group = talloc_strdup(plink, DEFAULT_MS_MCAST_GROUP);</span><br><span>      plink->u.virt.ms_mcast_port = DEFAULT_MS_MCAST_PORT;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/17271">change 17271</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/c/osmo-bts/+/17271"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411 </div>
<div style="display:none"> Gerrit-Change-Number: 17271 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>