OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-28
Reading a File: C Programming Example
969 break;
970
971 default:
972
973 bad_event ( event );
974 break;
975
976 } /* end of switch */
977
978 }
979 while ( event == ZFTM_VAL_EVT_DATA_IND );
980
981
982 /*******************************************************************/
983 /* When a cancel occurs, the data-transfer regime is terminated. */
984 /* Skip the next section if a cancel took place. */
985 /*******************************************************************/
986
987 if ( event != ZFTM_VAL_EVT_CANCEL_IND )
988 {
989
990 /*******************************************************************/
991 /* Send an FTM_TRANSFER_END_REQ_ call to the remote system and wai */
992 /* for a confirm. This action terminates the data-transfer regime. */
993 /*******************************************************************/
994
995 status = FTM_TRANSFER_END_REQ_ ( cepi );
996 if ( status != ZAPS_VAL_STATUS_OK )
997 {
998 printf ( "FTM_TRANSFER_END_REQ_ FAILED\n" );
999 check_status ();
1000 }
1001
1002 event = ZFTM_VAL_EVT_TRANSEND_CNF;
1003 get_event ( &event );
1004
1005 error = FTM_TRANSFER_END_CNF_ ( cepi
1006 , (long *) &action_result
1007 , (int *) &diag );