OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-153
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1831
1832
1833 #pragma PAGE "BAD_EVENT"
1834 /*********************************************************************/
1835 /* */
1836 /* Name: bad_event */
1837 /* */
1838 /* Description: The bad_event procedure is called when an */
1839 /* unexpected event is received from one of the */
1840 /* associations. The event can be an abort indication. */
1841 /* If an abort is received, the procedure aborts the */
1842 /* other association; any other event results in */
1843 /* aborts of both associations. */
1844 /* */
1845 /* Input: Event received on the association */
1846 /* */
1847 /* CEPI identifying the association that carried the */
1848 /* event */
1849 /* */
1850 /* Output: Error messages to terminal */
1851 /* */
1852 /*********************************************************************/
1853
1854 void bad_event ( event, cepi )
1855
1856 int event;
1857 int cepi;
1858
1859 {
1860
1861 /*******************************************************************/
1862 /* If an abort indication is received on one of the two */
1863 /* associations, the other must be aborted. Any other event */
1864 /* requires that both associations be aborted. */
1865 /*******************************************************************/
1866
1867 if ( event == ZFTM_VAL_EVT_PABORT_IND )
1868 {
1869