X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcore%2Fstore.c;h=e8d14a079679a12d5a76ef58735b44920065755d;hb=bc9f267e9066b70b8e379d11da80cb6b2749d49e;hp=5a36e29eef5817e2988d445accd19b352fbe6f61;hpb=40b40eda60b517297089a209f3681c8ec064cd68;p=sysdb.git diff --git a/src/core/store.c b/src/core/store.c index 5a36e29..e8d14a0 100644 --- a/src/core/store.c +++ b/src/core/store.c @@ -460,6 +460,22 @@ sdb_store_has_host(const char *name) return host != NULL; } /* sdb_store_has_host */ +sdb_store_base_t * +sdb_store_get_host(const char *name) +{ + sdb_store_obj_t *host; + + if (! name) + return NULL; + + host = sdb_store_lookup(SDB_HOST, name); + if (! host) + return NULL; + + sdb_object_ref(SDB_OBJ(host)); + return STORE_BASE(host); +} /* sdb_store_get_host */ + int sdb_store_attribute(const char *hostname, const char *key, const char *value, sdb_time_t last_update)