summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6332726)
raw | patch | inline | side by side (parent: 6332726)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 10 Feb 2014 18:15:40 +0000 (19:15 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 10 Feb 2014 18:15:40 +0000 (19:15 +0100) |
src/core/store.c | patch | blob | history |
diff --git a/src/core/store.c b/src/core/store.c
index 2522233112a8d125024d9853710ff90565f768d4..7e2602730d774cf83454775e79ff87f283b82677 100644 (file)
--- a/src/core/store.c
+++ b/src/core/store.c
*/
static sdb_store_obj_t *
-sdb_store_lookup_in_list(sdb_llist_t *l, int type, const char *name)
+store_lookup_in_list(sdb_llist_t *l, int type, const char *name)
{
sdb_llist_iter_t *iter;
if ((type != SDB_HOST) && (STORE_BASE(sobj)->type == SDB_HOST))
continue;
- sobj = sdb_store_lookup_in_list(sobj->children, type, name);
+ sobj = store_lookup_in_list(sobj->children, type, name);
if (sobj) {
sdb_llist_iter_destroy(iter);
return sobj;
}
sdb_llist_iter_destroy(iter);
return NULL;
-} /* sdb_store_lookup_in_list */
+} /* store_lookup_in_list */
static sdb_store_obj_t *
-sdb_store_lookup(int type, const char *name)
+store_lookup(int type, const char *name)
{
- return sdb_store_lookup_in_list(obj_list, type, name);
-} /* sdb_store_lookup */
+ return store_lookup_in_list(obj_list, type, name);
+} /* store_lookup */
/* The obj_lock has to be acquired before calling this function. */
static int
if (parent_type && parent_name) {
sdb_store_obj_t *parent;
- parent = sdb_store_lookup(parent_type, parent_name);
+ parent = store_lookup(parent_type, parent_name);
if (! parent) {
sdb_log(SDB_LOG_ERR, "store: Failed to store %s '%s' - "
"parent %s '%s' not found", TYPE_TO_NAME(type), name,
if (type == SDB_HOST)
/* make sure that each host is unique */
- old = STORE_BASE(sdb_store_lookup_in_list(obj_list, type, name));
+ old = STORE_BASE(store_lookup_in_list(obj_list, type, name));
else if (type == SDB_ATTRIBUTE)
/* look into attributes of this host */
old = STORE_BASE(sdb_llist_search_by_name(parent_list, name));
else
- /* look into services assigned to this host (sdb_store_lookup_in_list
+ /* look into services assigned to this host (store_lookup_in_list
* does not look up services from hierarchical hosts) */
- old = STORE_BASE(sdb_store_lookup_in_list(parent_list, type, name));
+ old = STORE_BASE(store_lookup_in_list(parent_list, type, name));
if (old) {
if (old->last_update > last_update) {
if (! name)
return NULL;
- host = sdb_store_lookup(SDB_HOST, name);
+ host = store_lookup(SDB_HOST, name);
return host != NULL;
} /* sdb_store_has_host */
if (! name)
return NULL;
- host = sdb_store_lookup(SDB_HOST, name);
+ host = store_lookup(SDB_HOST, name);
if (! host)
return NULL;