<p><a href="https://gerrit.osmocom.org/12659">View Change</a></p><p>6 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12659/2/include/osmocom/gsm/protocol/gsm_04_08.h">File include/osmocom/gsm/protocol/gsm_04_08.h:</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/12659/2/include/osmocom/gsm/protocol/gsm_04_08.h@59">Patch Set #2, Line 59:</a> <code style="font-family:monospace,monospace">osmo_classmark</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Since this is a part of GSM 04. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">sure, can, but I preferred it shorter.<br>Hmm, ok, maybe there are other classmarks besides the 48 ones...</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/include/osmocom/gsm/protocol/gsm_04_08.h@63">Patch Set #2, Line 63:</a> <code style="font-family:monospace,monospace">classmark2</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">(just wondering) we also have gsm48_classmark2, why not to use it here?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not entirely sure, maybe anticipating that classmark2 might grow in a future spec?<br>But actually, no, if at all, cm3 would be extended.<br>Looks like I should use gsm48_classmark2 indeed.<br>Now I'm unsure whether cm2 might ever be < 3 bytes.<br>Since existing code seems to use the cm2_len already, I'm just going to keep that.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c">File src/gsm/gsm48.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/12659/2/src/gsm/gsm48.c@1199">Patch Set #2, Line 1199:</a> <code style="font-family:monospace,monospace">snprintf(cm1, sizeof(cm1), "no-cm1");</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">PoC: https://pastebin. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">sure, better.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1234">Patch Set #2, Line 1234:</a> <code style="font-family:monospace,monospace">dst->classmark1_set</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Should we assign false otherwise?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">no, it's just an update. We can only add classmarks, not remove them.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1238">Patch Set #2, Line 1238:</a> <code style="font-family:monospace,monospace">sizeof(dst->classmark2)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Why not classmark2_len?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">to avoid having to check whether the len is > sizeof().<br>I can make it OSMO_MIN() if you prefer.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1303">Patch Set #2, Line 1303:</a> <code style="font-family:monospace,monospace">return 0;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">(just wondering) shouldn't we indicate this 'out of range' case somehow?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">we're in a libosmocore utility function, and I want to avoid adding logging.<br>The negative rc range is already used for "the missing classmark number (negative)",<br>so just return "no, A5/99 is not supported, go away".</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12659">change 12659</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/12659"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ifd27bab0380f7ad0c44c719aa6c8bd62cf7b034c </div>
<div style="display:none"> Gerrit-Change-Number: 12659 </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: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 21 Jan 2019 18:19:21 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>