I believe there is a misunderstanding of the purpose of get_next() here. See ConfD UG chapter 6.4 and 6.6. See also confd_lib_dp(3) man page “confd_register_data_cb” for details on the various callbacks you can implement with your data provider callpoint.
See also examples.confd/intro/5-c_stats example and this previous posting: