OSF DCE Application Development Guide--Introduction and Style Guide
OSF DCE Application Development Guide—Introduction and Style Guide
void sample_put_text(
rpc_binding_handle_t h, /* Client binding handle passed into the */
/* server stub. sec_acl_bind() is used to */
/* create this handle. */
uuid_t object_uuid, /* Desired object’s UUID. */
idl_char text[TEXT_SIZE], /* Text information to put. */
idl_long_int *status,
error_status_t *remote_st /* To return status. */
)
{
/* Our backing store data type. For a full explanation, see the */
/* body of sample_resolve_by_name(), in sample_server.c. See also */
/* the contents of sample_db.idl. */
sample_data_t data;
DCE_SVC_DEBUG((smp_svc_handle, smp_s_manager, svc_c_debug6,
"Entering sample_put_text()..."));
*remote_st = rpc_s_ok;
/* Get the object’s data header... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_manager, svc_c_debug6,
"Calling dce_db_fetch_by_uuid()..."));
dce_db_fetch_by_uuid(db_object, &object_uuid, (void *)&data, remote_st);
if (*remote_st != error_status_ok)
{
dce_svc_printf(OBJECT_NOT_FOUND_MSG);
return;
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_manager, svc_c_debug8,
"Storing text in object database"));
/* Now insert the text and stick it back in the backing store... */
strcpy(data.s_data.message, text);
DCE_SVC_DEBUG((smp_svc_handle, smp_s_manager, svc_c_debug6,
"Calling dce_db_store_by_uuid()..."));
dce_db_store_by_uuid(db_object, &object_uuid, (void *)&data, remote_st);
DCE_SVC_DEBUG((smp_svc_handle, smp_s_manager, svc_c_debug6,
"Successfully exiting sample_put_text()"));
}
/******
*
* print_manager_error-- Manager version. Prints text associated with bad
* status code.
*
*
******/
void
A− 78 Tandem Computers Incorporated 124246