<p><b>@miconda</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/1963#discussion_r287256590">src/modules/siptrace/siptrace.c</a>:</p>
<pre style='color:#555'>>  
                /* could use the dest_info we've already parsed but there's no way to pass
                 * it to DLGCB_CREATED callback so the only thing to do is keep
                 * it as uri, serialize in a dlg_var and parse again in DLGCB_CREATED */
                if(corid) {
-                       info->correlation_id = *corid;
+                       info->correlation_id.s = (char *)(info + 1);
</pre>
<p>Arithmetics with pointers is ok, adding 1 is practically adding the size of respective structure to the initial address. In old times, arithmetic operation with pointers was known to be safe when the pointer was referring to an array element, therefore I preferred to do cast to char* for initial pointer and then add sizeof(struct), like: <code>(char*)info + sizeof(siptrace_info_t)</code>. With modern compilers gcc/clang, I expect to be all fine with <code>(char*)(info + 1)</code>, I think it is in other parts of the code anyhow.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1963?email_source=notifications&email_token=ABO7UZKKA7Q3LEIWE2DG4R3PW6PGDA5CNFSM4HOVADQ2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZTJTAI#discussion_r287256590">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMVAYEBC7ZRIXLZYLDPW6PGDANCNFSM4HOVADQQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZMMOVQL6DURS3ZZPTLPW6PGDA5CNFSM4HOVADQ2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZTJTAI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1963?email_source=notifications\u0026email_token=ABO7UZKKA7Q3LEIWE2DG4R3PW6PGDA5CNFSM4HOVADQ2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZTJTAI#discussion_r287256590",
"url": "https://github.com/kamailio/kamailio/pull/1963?email_source=notifications\u0026email_token=ABO7UZKKA7Q3LEIWE2DG4R3PW6PGDA5CNFSM4HOVADQ2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOBZTJTAI#discussion_r287256590",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>