OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-146
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1558 /* Input: Expected_event, the event that the procedure */
1559 /* expects to receive on the association */
1560 /* */
1561 /* CEPI identifying the association that carries the */
1562 /* event */
1563 /* */
1564 /* Output: Expected_event, which contains the value of */
1565 /* the received event */
1566 /*********************************************************************/
1567
1568 void get_event ( expected_event, cepi )
1569
1570 int *expected_event;
1571 int cepi;
1572
1573 {
1574 int event_code;
1575
1576 /*****************************************************************/
1577 /* Wait for an event to be received. */
1578 /*****************************************************************/
1579
1580 status = APS_EVENT_RECEIVE_ ( cepi, WAIT_FOREVER );
1581
1582 if ( status != ZAPS_VAL_STATUS_EVENT )
1583 {
1584 /****************************************************************/
1585 /* A bad status has been received. */
1586 /****************************************************************/
1587
1588 check_status ( cepi );
1589 }
1590
1591 /******************************************************************/
1592 /* Get the event code. */
1593 /******************************************************************/
1594
1595 error = APS_STATUS_ ( cepi
1596 , (int *) &event_code );