How to disconnect a range callpoint when daemon stops

Did you try to set CONFD_DAEMON_FLAG_REG_REPLACE_DISCONNECT flag after you call confd_init_daemon? In both daemons (or at least in first that stops)?

It’s function int confd_set_daemon_flags( struct confd_daemon_ctx *dx, int flags); . See confd_lib_dp.

CONFD_DAEMON_FLAG_REG_REPLACE_DISCONNECT

    By default, if one daemon replaces a callpoint registration made by another daemon, this is only logged, and no
action is taken towards the daemon that has "lost" its registration. This can be useful in some scenarios, e.g. it is 
possible to have an "initial default" daemon providing "null" data for many callpoints, until the actual data 
provider daemons have registered. If a daemon uses the CONFD_DAEMON_FLAG_REG_REPLACE_DISCONNECT 
flag, it will instead be disconnected from ConfD if any of its registrations are replaced by another daemon, and 
can take action as appropriate.