---
name: "confdb_object_find"
section: "3"
platform: "linux"
package: "corosync-dev"
version: "1.4.6-1.1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/confdb_object_find"
---

# confdb\_object\_find(3)

Find a named object in the Configuration Database

## NAME

confdb\_object\_find - Find a named object in the Configuration Database

## SYNOPSIS

**#include \<corosync/confdb.h\>**

**confdb\_error\_t confdb\_object\_find\_start(confdb\_handle\_t** *handle***, unsigned int** *parent\_object\_handle* **);**

**confdb\_error\_t confdb\_object\_find(confdb\_handle\_t** *handle***, unsigned int** *parent\_object\_handle***, void** *\*object\_name***, int** *object\_name\_len***, unsigned int** *\*object\_handle* **);**

**confdb\_error\_t confdb\_object\_find\_destroy(confdb\_handle\_t** *handle***, unsigned int** *parent\_object\_handle* **);**

## DESCRIPTION

The **confdb\_object\_find** function repeatedly returns objects that match a given name. You must call **confdb\_object\_find\_start** first. This establishes a context for the parent object so that it knows where you are in the list. Then the next call to **confdb\_object\_find** will return the handle of the first object that matches the passed in name. Subsequent calls will return any remaining objects with the same name. The function returns CONFDB\_ERR\_ACCESS when the all of the matching objects have been seen. You need to provide the same object name and length for each call to **confdb\_object\_find,** If you change either of then, the results are undefined. The library holds a seperate context for each parent object, so you can call confdb\_object\_iter() on several parent objects at the same time and they will not interfere. Nor will they interfere with **confdb\_object\_iter** or **confdb\_key\_iter** calls on the same parent object. **When you have finished searching for objects, call the** **confdb\_object\_find\_destroy** library call to free up memory associated with the search context.

## RETURN VALUE

This call returns the CONFDB\_OK value if successful, otherwise an error is returned.

## ERRORS

The errors are undocumented.

## SEE ALSO

[**confdb\_overview**(8)](/confdb_overview/8.md), [**confdb\_initialize**(3)](/confdb_initialize/3.md), [**confdb\_finalize**(3)](/confdb_finalize/3.md), [**confdb\_dispatch**(3)](/confdb_dispatch/3.md), [**confdb\_object\_create**(3)](/confdb_object_create/3.md), [**confdb\_object\_destroy**(3)](/confdb_object_destroy/3.md), [**confdb\_object\_parent\_get**(3)](/confdb_object_parent_get/3.md), [**confdb\_key\_create**(3)](/confdb_key_create/3.md), [**confdb\_key\_delete**(3)](/confdb_key_delete/3.md), [**confdb\_key\_get**(3)](/confdb_key_get/3.md), [**confdb\_key\_replace**(3)](/confdb_key_replace/3.md), [**confdb\_object\_find\_start**(3)](/confdb_object_find_start/3.md), [**confdb\_object\_find**(3)](/confdb_object_find/3.md), [**confdb\_object\_iter\_start**(3)](/confdb_object_iter_start/3.md), [**confdb\_object\_iter**(3)](/confdb_object_iter/3.md), [**confdb\_key\_iter\_start**(3)](/confdb_key_iter_start/3.md), [**confdb\_key\_iter**(3)](/confdb_key_iter/3.md),
