FTAM/9000 Programmer's Guide

Chapter 10 397
Example Programs
Common Code Example
/*
** Release the connections between ftam_init and the
** responders for the source file and the destination file.
**
** Get the parameters for ft_rrequest.
** Call ft_rrequest and verify the outcome.
*/
(void)printf(“Releasing connections...\n”);
for (i = 0; i %< TWO_CONNECTIONS; ++i) {
rre_parm_in( & return_event_name, & rre_input_dcb, & rre_inout_dcb );
res = ft_rrequest(conn_id[i], return_event_name, rre_input_dcb,
& rre_inout_dcb);
if (res != SUCCESS)
error_handler(rre_inout_dcb-result, diag);
/*
** Free memory.
*/
res = ft_dfdcb((Octet *)rre_inout_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
}
/*
** Deactivate ftam_init
**
** Get the parameters for ft_aedeactivation.
** Call ft_aedeactivation and verify the outcome.
*/
(void)printf(“Deactivating ftam_init...\n”);
aed_parm_in( & return_event_name, & aed_inout_dcb );
res = ft_aedeactivation(ae_label, return_event_name, & aed_inout_dcb);
if (res != SUCCESS)
error_handler(aed_inout_dcb-result, diag);
/*
** Free memory.
*/
res = ft_dfdcb((Octet *)aed_inout_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
(void)printf(“ftm_llcopy: finished\n”);
return(SUCCESS);
}