<p>Neels Hofmeyr <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/13574">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add identifier sanitation for setting FSM instance ids<br><br>We often compose FSM instance IDs from context information, for example placing<br>an MSISDN string or IP:port information in the FSM instance id, using<br>osmo_fsm_inst_update_id_f(). This fails if any characters are contained that<br>don't pass osmo_identifier_valid(). Hence it is the task of the caller to make<br>sure only characters allowed in an FSM id are applied.<br><br>Provide API to trivially allow this by replacing illegal chars:<br>- osmo_identifier_sanitize_buf(), with access to the same set of illegal<br>  characters defined in utils.c,<br>- osmo_fsm_inst_update_id_f_sanitize() implicitly replaces non-identifier<br>  chars.<br><br>This makes it easy to add strings like '192.168.0.1:2342' or '+4987654321' to<br>an FSM instance id, without adding string mangling to each place that sets an<br>id; e.g. replacing with '-' to yield '192-168-0-1:2342' or '-4987654321'.<br><br>Change-Id: Ia40a6f3b2243c95fe428a080b938e11d8ab771a7<br>---<br>M include/osmocom/core/fsm.h<br>M include/osmocom/core/utils.h<br>M src/fsm.c<br>M src/utils.c<br>4 files changed, 53 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/13574/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/13574">change 13574</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/13574"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: Ia40a6f3b2243c95fe428a080b938e11d8ab771a7 </div>
<div style="display:none"> Gerrit-Change-Number: 13574 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@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>