<p><a href="https://gerrit.osmocom.org/12199">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/12199/1/src/gsm/gsm29118.c">File src/gsm/gsm29118.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/12199/1/src/gsm/gsm29118.c@186">Patch Set #1, Line 186:</a> <code style="font-family:monospace,monospace">/* Allocate an empty message buffer, suitable to hold a complite SGsAP msg. */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">typo: complete?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12199/1/src/gsm/gsm29118.c@191">Patch Set #1, Line 191:</a> <code style="font-family:monospace,monospace">       return msgb_alloc_headroom(1024, 128, "SGsAP");</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">So 512 seems far more reasonable, right?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12199/1/src/gsm/gsm29118.c@207">Patch Set #1, Line 207:</a> <code style="font-family:monospace,monospace">               len = 55;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Probably makes sense to at least print an error if strlen(name) > 55 in this case.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12199/1/src/gsm/gsm29118.c@219">Patch Set #1, Line 219:</a> <code style="font-family:monospace,monospace">  msgb_tlv_put(msg, SGSAP_IE_IMSI, len - 2, buf + 2);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">why not using msgb_put() if we already have the whole TLV in buf? because the TAG is different?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12199/1/src/gsm/gsm29118.c@227">Patch Set #1, Line 227:</a> <code style="font-family:monospace,monospace">      msgb_tlv_put(msg, SGSAP_IE_LAI, 5, (uint8_t *) & lai_enc);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">sizeof(lai_enc) instead of 5 probably?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12199/1/src/gsm/gsm29118.c@251">Patch Set #1, Line 251:</a> <code style="font-family:monospace,monospace">struct msgb *gsm29118_create_dl_ud(const char *imsi, struct msgb *nas_msg)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">does it make sense to require a msgb here API-wise? probably a pointer + len makes more sense. This way if caller doesn't have a msgb doesn't need to create an extra one.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12199">change 12199</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/12199"/><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: Ic87f8a771b87b52215d0a7451b67794557b80b8a </div>
<div style="display:none"> Gerrit-Change-Number: 12199 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-CC: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 07 Dec 2018 12:06:03 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>