OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
/* Import a binding... */
else if (*status == rpc_s_partial_results || *status == error_status_ok)
{
fprintf(stdout, "sample_client: Binding to resolved name...0);
fprintf(stdout, "sample_client: Calling rpc_ns_binding_import_begin()...0);
rpc_ns_binding_import_begin(
rpc_c_ns_syntax_default,
resolved_name, /* This should be a namespace leaf. */
if_hint, /* Interface we were originally given. */
id_hint, /* Object UUID we were originally given. */
&import_context,
status);
/* If this has failed, one possible reason is that we sup- */
/* plied an id_hint and this wasn’t in the junction. We */
/* could try to import with the nil-UUID at this point and */
/* then put the id_hint into the returned binding. That */
/* way, we would succeed if the correct UUID was in the */
/* endpoint map. For now, though, we’ll just fail. */
/* [--original note] */
/* */
/* Well, it’s hard to see what sense the above makes when */
/* the only way this function is ever called is with a */
/* null interface... */
if (*status != error_status_ok)
{
print_error("rpc_ns_binding_import_begin()", *status);
return;
}
}
fprintf(stdout, "sample_client: Calling rpc_ns_binding_import_next()...0);
rpc_ns_binding_import_next(
import_context,
(rpc_binding_handle_t*)binding_h,
status);
if (*status != error_status_ok)
{
print_error("rpc_ns_binding_import_next()", *status);
return;
}
fprintf(stdout, "sample_client: Calling rpc_ns_binding_import_done()...0);
rpc_ns_binding_import_done(&import_context, status);
if (*status != error_status_ok)
{
print_error("rpc_ns_binding_import_done()", *status);
return;
}
/* We succeeded in importing a (partial) binding. Presumably the */
/* name we successfully used is in resolved_name, but for some */
/* reason he wants to make the following call to get that name. */
/* Note that this is only for the purpose of returning the name */
A 94 Tandem Computers Incorporated 124246