<p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn.c">File ggsn/ggsn.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn.c@473">Patch Set #4, Line 473:</a> <code style="font-family:monospace,monospace">default_apn_done:</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">as you can see I tried a few options here.  […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">why not simply create a function "select_default_apn()" which returns the 'apn' pointer and hides all the selection logic? I guess you could also live without goto then as you can simply return early.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn_vty.c">File ggsn/ggsn_vty.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn_vty.c@300">Patch Set #4, Line 300:</a> <code style="font-family:monospace,monospace">    "default-apnv6 NAME",</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">come to think of it now,  […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I agree the name is a bit odd, the dash would improve things. Ideally one would have "default-apn (v4|v6|v4v6) NAME" but of course that is not an option as it breaks compatibility with old configs that just state "default-apn"</p><p style="white-space: pre-wrap; word-wrap: break-word;">Maybe "default-apn NAME [(v4|v6|v4v6)]" would work. If the final argument is not specified, v4 is assumed as a default.  This way it's backwards compatible.  Same applies for "no default-apn [(v4|v6|v4v6)]".</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941">change 17941</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-ggsn/+/17941"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ggsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I03fcf8a1532bd9988ea99a6afd3dc325174ce9d6 </div>
<div style="display:none"> Gerrit-Change-Number: 17941 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 25 Apr 2020 13:56:20 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>