diff --git a/src/core/store.c b/src/core/store.c
index 4e6eb4804aad042621dd267f642f4c8a445014b8..024733fc7350cf33cbc20673b5e09c4ccfe17a12 100644 (file)
--- a/src/core/store.c
+++ b/src/core/store.c
} /* sdb_cmp_store_obj_with_name */
/*
- * private types
+ * public types
*/
static int
return SDB_OBJ(new);
} /* sdb_svc_clone */
-static sdb_type_t sdb_host_type = {
+const sdb_type_t sdb_host_type = {
sizeof(sdb_host_t),
sdb_host_init,
sdb_host_do_clone
};
-static sdb_type_t sdb_attr_type = {
+const sdb_type_t sdb_attribute_type = {
sizeof(sdb_attribute_t),
sdb_attr_init,
sdb_attr_clone
};
-static sdb_type_t sdb_svc_type = {
+const sdb_type_t sdb_service_type = {
sizeof(sdb_service_t),
sdb_svc_init,
}
}
else {
- sdb_host_t *new = SDB_HOST(sdb_host_do_clone(SDB_CONST_OBJ(host)));
+ sdb_host_t *new = SDB_HOST(sdb_object_clone(SDB_CONST_OBJ(host)));
if (! new) {
char errbuf[1024];
sdb_log(SDB_LOG_ERR, "store: Failed to clone host object: %s",
if ((! hostname) || (! name) || (! value))
return NULL;
- obj = sdb_object_create(sdb_attr_type, hostname, name, value);
+ obj = sdb_object_create(sdb_attribute_type, hostname, name, value);
if (! obj)
return NULL;
return SDB_ATTR(obj);
}
}
else {
- sdb_attribute_t *new = SDB_ATTR(sdb_attr_clone(SDB_CONST_OBJ(attr)));
+ sdb_attribute_t *new = SDB_ATTR(sdb_object_clone(SDB_CONST_OBJ(attr)));
if (! new) {
char errbuf[1024];
sdb_log(SDB_LOG_ERR, "store: Failed to clone attribute "
if ((! hostname) || (! name))
return NULL;
- obj = sdb_object_create(sdb_svc_type, hostname, name);
+ obj = sdb_object_create(sdb_service_type, hostname, name);
if (! obj)
return NULL;
return SDB_SVC(obj);
}
}
else {
- sdb_service_t *new = SDB_SVC(sdb_svc_clone(SDB_CONST_OBJ(svc)));
+ sdb_service_t *new = SDB_SVC(sdb_object_clone(SDB_CONST_OBJ(svc)));
if (! new) {
char errbuf[1024];
sdb_log(SDB_LOG_ERR, "store: Failed to clone service "