summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 045e522)
raw | patch | inline | side by side (parent: 045e522)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 24 Jul 2013 04:02:51 +0000 (21:02 -0700) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 24 Jul 2013 04:02:51 +0000 (21:02 -0700) |
src/core/store.c | patch | blob | history | |
src/include/core/store.h | patch | blob | history |
diff --git a/src/core/store.c b/src/core/store.c
index b9335818c203a753cd3fa84ae2db18b270e7cfe7..1dcecaae363296190c65a4cfa47be4893563af80 100644 (file)
--- a/src/core/store.c
+++ b/src/core/store.c
const sdb_attribute_t *attr = (const sdb_attribute_t *)obj;
sdb_attribute_t *new;
- new = sdb_attribute_create(attr->hostname,
- obj->name, attr->attr_value);
+ new = SDB_ATTR(sdb_object_create(obj->name, sdb_attribute_type,
+ attr->hostname, attr->attr_value));
if (! new)
return NULL;
return host != NULL;
} /* sdb_store_has_host */
-sdb_attribute_t *
-sdb_attribute_create(const char *hostname,
- const char *name, const char *value)
-{
- sdb_object_t *obj;
-
- if ((! hostname) || (! name) || (! value))
- return NULL;
-
- obj = sdb_object_create(name, sdb_attribute_type, hostname, value);
- if (! obj)
- return NULL;
- return SDB_ATTR(obj);
-} /* sdb_attribute_create */
-
int
sdb_store_attribute(const sdb_attribute_t *attr)
{
index aac884a5d104a72cd747c3db83ffa0f8b478a5c7..143fa7e54409a979aea959f5bbe4432d4473576b 100644 (file)
--- a/src/include/core/store.h
+++ b/src/include/core/store.h
_Bool
sdb_store_has_host(const char *name);
-sdb_attribute_t *
-sdb_attribute_create(const char *hostname,
- const char *name, const char *value);
-
/*
* sdb_store_attribute:
* Add/update a host's attribute in the store. If the attribute, identified by