OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-137
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1207 break;
1208
1209 case ZFTM_VAL_EVT_CANCEL_IND :
1210
1211 /*************************************************************/
1212 /* The source system has cancelled the transfer. Call the */
1213 /* indication procedure to get the error and action result, */
1214 /* and then send a response to the source system. Finally, */
1215 /* send a cancel request to the destination system and wait */
1216 /* for the confirm. This terminates the data-transfer */
1217 /* regimes. Additional application-specific error handling */
1218 /* could be implemented if required by an application. */
1219 /*************************************************************/
1220
1221 error = FTM_CANCEL_IND_ ( src_cepi
1222 , (long *) &action_result
1223 , (int *) &diag );
1224 check_error ();
1225 check_action_diag ();
1226
1227 status = FTM_CANCEL_RSP_ ( src_cepi
1228 , /* action_result */ );
1229 check_status ( src_cepi );
1230
1231 status = FTM_CANCEL_REQ_ ( dst_cepi
1232 , action_result
1233 , (int *) &diag );
1234 check_status ( dst_cepi );
1235
1236 event = ZFTM_VAL_EVT_CANCEL_CNF;
1237 get_event ( &event, dst_cepi );
1238
1239 error = FTM_CANCEL_CNF_ ( dst_cepi
1240 , (long *) &action_result
1241 , (int *) &diag );
1242 check_error ();
1243 check_action_diag ();
1244
1245 break;