@miconda commented on this pull request.


In src/modules/keepalive/keepalive_rpc.c:

> +	return;
+}
+static const char *keepalive_rpc_get_doc[2] = {
+		"gets destination info data  from keepalive memory. usage keepalive.get sip:xx@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, view it on GitHub, or unsubscribe.