OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-15
Reading a File: C Programming Example
462 , (int *) &func_units
463 , (int *) &attr_groups
464 , (int *) &contents_type_list
465 , (int *) &diag );
466
467 if ( error != ZAPS_ERR_OK )
468 {
469 printf ( "FTM_INITIALIZE_CNF_ FAILED\n" );
470 check_error ();
471 }
472 if ( state_result == ZFTM_VAL_STATE_FAILURE )
473 {
474 printf ( "FTM_INITIALIZE_CNF_ FAILED\n" );
475 check_state ();
476 }
477 if ( action_result == ZFTM_VAL_ACTION_FAILURE )
478 {
479 printf ( "FTM_INITIALIZE_CNF_ FAILED\n" );
480 check_action ();
481 }
482
483
484 /******************************************************************/
485 /* Verify that the functional units have not been negotiated down */
486 /* from what was requested. If the requested functional units are */
487 /* not available, then discard the association and exit the */
488 /* program. Additional application-specific error handling or */
489 /* recovery could be implemented if required by an application. */
490 /******************************************************************/
491
492 if ( func_units.zread != ZAPS_VAL_TRUE ||
493 func_units.zgroup != ZAPS_VAL_TRUE )
494 {
495 printf ( "Functional units unavailable on association\n" );
496 action_result = ZFTM_VAL_ACTION_FAILURE;
497 status = FTM_U_ABORT_REQ_ ( cepi
498 , action_result );
499 if ( status != ZAPS_VAL_STATUS_OK )
500 {