OSI/FTAM Programming Guide
NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide—528612-001
5-35
Reading a File: C Programming Example
1242
1243 /*******************************************************************/
1244 /* If an association exists, discard it. */
1245 /*******************************************************************/
1246
1247 if ( cepi != NOCEPI )
1248 APS_DISCARD_ ( cepi );
1249
1250 /*******************************************************************/
1251 /* Display a message on the terminal and exit the program. */
1252 /*******************************************************************/
1253
1254 printf ( "Unexpected event received\n");
1255 printf ( "Association discarded\n");
1256 exit (EXIT_SUCCESS);
1257
1258 } /* bad_event */
1259
1260
1261 #pragma PAGE "CHECK_ACTION"
1262 /********************************************************************/
1263 /* */
1264 /* Name: check_action */
1265 /* */
1266 /* Description: The following procedure is called when an FTM */
1267 /* confirm procedure returns a bad action_result. The */
1268 /* procedure displays an error message and calls */
1269 /* check_diag for diagnostic messages. */
1270 /* */
1271 /********************************************************************/
1272
1273 void check_action ()
1274
1275 {
1276
1277 /******************************************************************/
1278 /* Display the invalid action-result error message.You might */
1279 /* also want to print out the diagnostic field to obtain more */
1280 /* information about the error condition. */