OSF DCE Application Development Guide--Introduction and Style Guide
A Sample Application
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling rpc_string_free()"));
rpc_string_free(&string_binding, status);
if (*status != rpc_s_ok)
{
print_server_error("rpc_string_free()", *status);
exit(1);
}
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug7,
"Exiting server_register_get_bindings()"));
}
/******
*
*
* server_export_objects -- Set up a simple object-based binding scheme
* for the server, i.e.:
*
* Register bindings and objects in the endpoint map,
* Then export each object to a separate name space entry.
*
* The function uses a vector of entry names that correspond one-to-one
* with the objects in the object uuid vector. The server must have
* export permission to CDS in order to successfully execute this
* function.
*
* Called from main().
*
******/
void server_export_objects(
rpc_if_handle_t interface, /* The interface specification. */
rpc_binding_vector_t *binding_vector, /* The server’s binding handles. */
uuid_vector_t *object_uuid_vector, /* Server instance UUID, created in */
/* main. */
entryname_vector_t *entryname_vector, /* Server entry names, from command */
/* line. */
unsigned_char_t *annotation, /* Annotation string for endpoint */
/* map entry. */
unsigned32 *status) /* To return status */
{
uuid_vector_t object_uuid; /* Used to hold object UUIDs to be */
/* passed to rpc_ns_binding_export(). */
int i; /* Index variable. */
124246 Tandem Computers Incorporated A− 23