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

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/2579#discussion_r540885484">src/modules/keepalive/keepalive_mod.c</a>:</p>
<pre style='color:#555'>> -    str owner = str_init("_params");
-       LM_DBG("adding destination %.*s\n", dest.len, dest.s);
+       return 1;
+}
+
+static int ka_add_initial_destinations() {
+       LM_DBG("ka_add_initial_destinations called \n");
+       int res = 1;
+
+       ka_initial_dest_t *current_position = ka_initial_destinations_list;
+       while ( res > 0 && current_position != NULL) {
+               res = ka_add_dest(&(current_position->uri), &(current_position->owner), 0, ka_ping_interval, 0, 0, 0);
+               LM_INFO("Added initial destination Via \"destination\" parameter <%.*s> \n", current_position->uri.len, current_position->uri.s);
+               shm_free(current_position->uri.s);
+               shm_free(current_position->owner.s);
+               ka_initial_dest_t *old_position = current_position;
</pre>
<p>old_position has to be defined at the beginning of the function</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/2579#pullrequestreview-550022987">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLCUS4E4F4ZDGFDLZTSUH76VANCNFSM4UQ6PG2Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZM46RU5FTIRBX6ZUQDSUH76VA5CNFSM4UQ6PG22YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOEDEK6SY.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/2579#pullrequestreview-550022987",
"url": "https://github.com/kamailio/kamailio/pull/2579#pullrequestreview-550022987",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>