OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
/* For the object database, we need standard backing store headers */
/* to hold UUIDs for all the various ACLs... */
dbflags |= db_c_std_header;
if (need_init)
dbflags |= db_c_create;
/* Now open (or create) the "db_object" store... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling dce_db_open()"));
/* Build the full pathname string for the database... */
free(acl_path_string);
acl_path_string = malloc(MAX_ACL_PATH_SIZE);
strcpy((char *)acl_path_string, (char *)db_acl_path);
strcat((char *)acl_path_string, (char *)"/");
strncat((char *)acl_path_string, "db_object", strlen("db_object"));
dce_db_open(
(char *)acl_path_string, /* Filename of backing store. */
NULL, /* Backing store "backend type" default == hash. */
dbflags, /* Specifies index by UUID, and include standard */
/* headers. */
(dce_db_convert_func_t)sample_data_convert, /* Serializa- */
/* tion function for object data. */
db_object, /* The returned backing store handle. */
status);
if (*status != error_status_ok)
{
print_server_error("dce_db_open()", *status);
free(acl_path_string);
return;
}
/* Create the indexed-by-name database... */
dbflags = db_c_index_by_name;
if (need_init)
dbflags |= db_c_create;
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling dce_db_open()"));
A− 44 Tandem Computers Incorporated 124246