maapi_get_elem is causing error and stopping the confd client and reconnecting

Hi,
Using MAAPI interface for show commands. While executing one of the show command which takes VRF name, Keypath is coming properly. Passing the VRF-1 to get_vrf_rtm_index. Using this in the maapi_get_elem, api, which shows vrf name as some garbage and does not exists and CONFD_ERR is getting returned and the application is getting close. Can you please suggest what could have caused this .

kp: keypath == /filter-views/rib/instance{VRF-1 ipv4 unicast}/routeRibTemplateList
get_vrf_rtm_index
TRACE MAAPI_GET_ELEM /vrf-config/stringTOindex{ év<85>³}/rtmIndexDEBUG item does not exist - /routing-vrf:vrf-config/stringTOindex{év<85>³} does not exist
–> CONFD_ERR

Thanks
Phani

When calling maapi_get_elem() you need to input a path, i.e. a string.

From the confd_lib_maapi man page:

int maapi_get_elem(int sock, int thandle, confd_value_t *v, const char *fmt, …);
This reads a value from the path in fmt and writes the result into the result parameter confd_value_t. The path must lead to a leaf node in the data tree.

Can you explain what “get_vrf_rtm_index” does?
How does the “/vrf-config/stringTOindex{ év<85>³}/rtmIndex” path get created?