[sr-dev] [kamailio/kamailio] keepalive: added add/del/get/flush rpc commands (#2177)
Daniel-Constantin Mierla
notifications at github.com
Mon Jan 6 18:23:15 CET 2020
miconda commented on this pull request.
> + return;
+}
+static const char *keepalive_rpc_get_doc[2] = {
+ "gets destination info data from keepalive memory. usage keepalive.get sip:xx at domain listname", 0};
+
+
+static void keepalive_rpc_flush(rpc_t *rpc, void *ctx)
+{
+ ka_dest_t *dest;
+ LM_DBG("Keepalive flushes \n");
+ ka_lock_destination_list();
+
+ for(dest = ka_destinations_list->first; dest != NULL; dest = dest->next) {
+ free_destination(dest);
+ }
+ ka_destinations_list->first = 0;
There is no strict policy on using `NULL` or `0` for pointers, probably the former is more intuitive for pointers and eventually raise compile warnings if the type is not pointer, but there are many places in the code where `0` is used for this purpose. If someone wants to make it coherent everywhere by using `NULL` instead of `0` for pointers, I am fine with it.
Given that the PR is rather old here, I am going to merge it and fix what was pointed in the other comments.
--
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/2177#discussion_r363394577
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200106/6314984c/attachment.html>
More information about the sr-dev
mailing list