OSF DCE Application Development Guide--Introduction and Style Guide

A Sample Application
/*****
*
* print_server_error-- Server version. Prints text associated with
* bad status code.
*
*
*****/
void
print_server_error(
char *caller, /* Routine that received the error. */
error_status_t status) /* Status we want to print the message for. */
{
dce_error_string_t error_string;
int print_status;
dce_error_inq_text(status, error_string, &print_status);
dce_svc_printf(SERVER_ERROR_MSG, caller, error_string);
}
Note that the server code contained in these files is nearly all generic. In the ACL
manager, the only application specific elements are the type of data stored in the object
database, declared in sample.idl, and the name and object UUID for the initial object
created during ACL manager setup. The export objects operation uses application-
specific names and object uuids. The signal catcher thread installs application-specific
handling for asynchronous signals, although the actual signal handling code simply
causes the listen loop to return and invoke the generic cleanup operations.
124246 Tandem Computers Incorporated A 69