Confd_hash2str returns null

Hello,

confd_hash2str returns null as the string.
What can be the cause of this?

thank you,
Kobi

ConfD comes with very comprehensive documentation. You can find detail information on the ConfD API calls in vol. 3 of the man-pages section at the back of the ConfD User Guide. Quoting from the man-page for confd_has2str under confd_lib_lib:

Returns a NUL-terminated string representing the node name given by hash, or NULL if the hash value is not found.

Hi Wai, yes, I’ve noticed this in the documentation.
I don’t understand why it is not found. Where does the hash comes from?
I’m using the 1-2-3-start-query-model example.
I’m generating fxs and the dhcpd.h file which has all the numeric values.
What else could it be that I’m missing that will cause the hash values to be not found?

If you read further in the documentation, it has indicated that the schema information has to be loaded which requires that the confd_load_schema( ) call be invoked. Take a look at the intro/5-c_stats example to see how to use the confd_load_schema( ) API call.

1 Like