OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-24
Example 1 in C—Updating a Remote File (in Nowait
Mode)
466 if ( count_transferred != -1 )
467 {
468 buf_count_transferred = count_transferred;
469 }
470
471 if ( filenum != local_filenum )
472 /* Process the I/O completion of an FTAM or APS procedure or event */
473 {
474
475 /****************************************************************/
476 /* Determine whether an FTAM I/O operation completed or an */
477 /* event was received. If neither, display the error code */
478 /* and error subcode. */
479 /****************************************************************/
480
481 if ( status == ZAPS_VAL_STATUS_OK )
482 {
483 ftam_io_cmpl ();
484 }
485 else if ( status == ZAPS_VAL_STATUS_EVENT )
486 {
487 ftam_event_rcvd ();
488 }
489 else
490 {
491 check_status ();
492 APS_DISCARD_ ( cepi );
493 exit (EXIT_FAILURE);
494 }
495 }
496 else /* Process the local file I/O completion */
497 {
498 /****************************************************************/
499 /* Check the condition code to determine if the local file */
500 /* I/O operation completed successfully. */
501 /****************************************************************/
502
503 if ( condition_code != CCE )
504 {