OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-36
Example 1 in C—Updating a Remote File (in Nowait
Mode)
935 , (long) ABORT_TAG );
936
937 /******************************************************************/
938 /* If the above abort request is sent to the remote system, */
939 /* calling the main procedure sets the remote_file_update_cmpl */
940 /* flag, and the program is terminated. If the request is not */
941 /* sent out, set the flag here and return to the main procedure. */
942 /******************************************************************/
943
944 if ( status != ZAPS_VAL_STATUS_OK )
945 remote_file_update_cmplt = TRUE;
946 return;
947
948 }
949
950 /********************************************************************/
951 /* Verify that the contents-type-list has not been negotiated down */
952 /* from what was requested. If the requested contents type is */
953 /* not available, then discard the association and exit the program.*/
954 /* Additional application-specific error handling or recovery could */
955 /* be implemented if required by an application. */
956 /********************************************************************/
957
958 if ( memcmp ( contents_type_list.zcntnts_type_list[0].u_zcntntstype.
959 zcntntstype.zobj_id
960 , document_type, sizeof (document_type) ) == 0 )
961 {
962 contents_type.zid = ZFTM_VAL_CNTNTSTYPE_DOCTYPE;
963 contents_type.u_zcntntstype.zdoctype.zdoctypename.znum_elements = 5;
964 memcpy ( contents_type.u_zcntntstype.zdoctype.zdoctypename.zobj_id
965 , document_type, sizeof (document_type) );
966
967 contents_type.u_zcntntstype.zdoctype.zuniversalclassispresent
968 = ZAPS_VAL_PRESENT;
969 contents_type.u_zcntntstype.zdoctype.zuniversalclass
970 = ZFTM_VAL_UC_GRAPHIC_STRING;
971 contents_type.u_zcntntstype.zdoctype.zmaxstringlenispresent
972 = ZAPS_VAL_PRESENT;
973 contents_type.u_zcntntstype.zdoctype.zmaxstringlen