OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-147
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1597 check_error ();
1598
1599 /*****************************************************************/
1600 /* Verify that the expected event was received. If the expected */
1601 /* event = ANYEVENT, then any event code is valid. */
1602 /*****************************************************************/
1603
1604 if ( event_code != *expected_event &&
1605 *expected_event != ANYEVENT )
1606 {
1607 bad_event ( event_code, cepi );
1608 }
1609
1610 /*****************************************************************/
1611 /* Return the received event code to the caller. */
1612 /*****************************************************************/
1613 if ( *expected_event == ANYEVENT )
1614 {
1615 *expected_event = event_code;
1616 }
1617
1618 } /*** get_event ***/
1619
1620
1621 #pragma PAGE "CHECK_STATUS"
1622 /**********************************************************************/
1623 /* */
1624 /* Name: check_status */
1625 /* */
1626 /* Description: The check_status procedure checks the status */
1627 /* returned from an FTM or APS procedure call. It */
1628 /* checks for NORETRY, RETRYLATER, and DISCARD. If */
1629 /* status is OK, it returns control to the main */
1630 /* program; otherwise, it discards the associations */
1631 /* and exits the program. */
1632 /* */
1633 /* Input: CEPI identifying the association whose status is */
1634 /* being checked */
1635 /* */