<p></p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/grumvalski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/grumvalski">@grumvalski</a> - I think it makes no sense to added to the <code>cfg_group_core / default_core_cfg</code> structure, because that is for parameters that can be changed at runtime. But, imo, this is not set once and actually use only during startup, when the stats names are exported.</p>
<p>It can simply be a global variable like <code>int ksr_tcp_accept_hep3=0;</code>. It can be added to src/core/counters.c and exposed with extern in src/core/globals.h.</p>
<p>The cfg_group_* structures work as a block and making them larger without a reason should be avoided.</p>
<p>In the future probably we should create some structures for global attributes grouped per purpose, so instead of many individual global variables, there will be a few global structure.</p>
<p>As a side node, I would recommend using the <code>ksr_</code> prefix for global variables in the core, recently I encounter some issues with global variables being cross visible between object files, so db_mode of permissions module was inherited by usrloc module. Apparently some compilers (or operating systems) build libraries with visibility for all symbols, without adding any prefix.</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/2304#issuecomment-622762317">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMBTZUDM7X74EDCGSTRPPAZHANCNFSM4MSTWR6Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJ6WBKTJKNND3UUEKDRPPAZHA5CNFSM4MSTWR62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEUPJSTI.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/2304#issuecomment-622762317",
"url": "https://github.com/kamailio/kamailio/pull/2304#issuecomment-622762317",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>