OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-152
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1792 abort_discard ();
1793
1794 exit (EXIT_SUCCESS);
1795
1796 }
1797
1798 } /*** check_error ***/
1799
1800
1801 #pragma PAGE "CHECK_STATE"
1802 /*********************************************************************/
1803 /* */
1804 /* Name: check_state */
1805 /* */
1806 /* Description: The check_state procedure checks for a state */
1807 /* result of failure on an FTM confirm. If the */
1808 /* the state result is failure, this procedure */
1809 /* displays an error message, calls abort_discard, */
1810 /* and exits the program. */
1811 /* */
1812 /* Input: None */
1813 /* */
1814 /* Output: Error message to terminal */
1815 /* */
1816 /*********************************************************************/
1817
1818 void check_state ()
1819
1820 {
1821 if ( state_result == ZFTM_VAL_STATE_FAILURE )
1822 {
1823 printf ( "Bad state result received\n");
1824 printf ( "Associations discarded\n");
1825
1826 abort_discard ();
1827
1828 exit (EXIT_SUCCESS);
1829 }
1830 } /*** check_state ***/