<p><a href="https://gerrit.osmocom.org/c/osmo-sip-connector/+/25675">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-sip-connector/+/25675/2/src/sip.c">File src/sip.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-sip-connector/+/25675/2/src/sip.c@116">Patch Set #2, Line 116:</a> <code style="font-family:monospace,monospace">  char gcr_hex[sizeof(call->gcr)*2] = {0};</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Not sure this kind of initializer for arrays is actually setting all values to 0, but only the first […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Hi Pau, Thanks for taking a look at this! I'm aware it's full of issues. Not only in terms of coding, but also strategy. It's WIP.</p><p style="white-space: pre-wrap; word-wrap: break-word;">But yes, how to do all this initialization and also getting the correct size for the osmohexdump dest buffer is something I have problems with.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-sip-connector/+/25675/2/src/sip.c@125">Patch Set #2, Line 125:</a> <code style="font-family:monospace,monospace">                 memcpy(gcr_hex, unknown_header->un_value, sizeof(gcr_hex));</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">do you really need this gcr_hex intermediate variable and hence this memcpy? I guess you can simply  […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-sip-connector/+/25675/2/src/sip.c@612">Patch Set #2, Line 612:</a> <code style="font-family:monospace,monospace">   char gcr_hex[sizeof(leg->base.call->gcr)*2] = { NULL };</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">See my comment regarding memset. Furthermore, NULL char makes no sense as a char. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sip-connector/+/25675">change 25675</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-sip-connector/+/25675"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sip-connector </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id40d7e0fed9356f801b3627c118150055e7232b1 </div>
<div style="display:none"> Gerrit-Change-Number: 25675 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </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-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 04 Oct 2021 15:42:45 +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: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>