OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-33
Example 1 in C—Updating a Remote File (in Nowait
Mode)
817 /* The remote system has cancelled the transfer. Call */
818 /* FTM_CANCEL_IND_ to get the action result and diagnostic */
819 /* messages and FTM_CANCEL_RSP_ to acknowledge the indication */
820 /* from the remote system. This terminates the data-transfer */
821 /* regime. */
822 /***************************************************************/
823
824 error = FTM_CANCEL_IND_ ( cepi
825 , &action_result
826 , (int *) &diag );
827
828 check_error ();
829 check_action_diag ();
830
831 printf ( "The data transfer has been cancelled\n" );
832
833 status = FTM_CANCEL_RSP_ ( cepi
834 , /* action_result */
835 , /* diag */ );
836
837 check_status ();
838 remote_file_update_cmplt = TRUE;
839 break;
840
841 default: /* Unknown event */
842 printf ("Invalid Event\n");
844 APS_DISCARD_ ( cepi );
845 exit (EXIT_FAILURE);
846 break;
847
848 } /* end of case */
849
850 /*******************************************************************/
851 /* If the file update is not complete, issue another */
852 /* APS_EVENT_RECEIVE_ to receive the next event. */
853 /********************************************************************/
854
855 if ( remote_file_update_cmplt == FALSE )
856 {