[sr-dev] [kamailio/kamailio] keepalive: fix initialization when using destination mod param (#2579)
Victor Seva
notifications at github.com
Tue Dec 15 10:35:02 CET 2020
@linuxmaniac commented on this pull request.
> + ka_initial_dest_t * new_destination = (ka_initial_dest_t *) shm_malloc(sizeof(ka_initial_dest_t));
+ new_destination->uri.s = shm_malloc(sizeof(char) * strlen(uri));
+ new_destination->owner.s = shm_malloc(sizeof(char) * strlen(owner));
+
+ memcpy(new_destination->uri.s, uri, strlen(uri));
+ new_destination->uri.len = strlen(uri);
+
+ memcpy(new_destination->owner.s, owner, strlen(owner));
+ new_destination->owner.len = strlen(owner);
+
+ new_destination->next = NULL;
+
+ if (ka_initial_destinations_list == NULL) {
+ ka_initial_destinations_list = new_destination;
+ } else {
+ ka_initial_dest_t *current_position = ka_initial_destinations_list;
Just an example: https://github.com/kamailio/kamailio/commit/daa86b204d3030e2abb2f2459aa348998b982ae2
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2579#discussion_r543186293
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20201215/b54bfad2/attachment.htm>
More information about the sr-dev
mailing list