OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-229
Translation Application Example
280 printf ("Opener Backup Gone! Reestablished with " Primary.\n");
281 else
282 /* The second call to OpenResponderFile() tries to reopen*/
283 /* the responder. If open works, it will enable as well */
284 if (OpenResponderFile()) /* Try to open once */
285 printf ("Opener Backup Gone! Reestablished Open"
286 " with Primary.\n")
287 else
288 {
289 printf ("Opener Lost! Attempting to reopen"
290 "every %d seconds.\n",
291 RETRY_OPEN_TIMEOUT_VALUE / 100);
292 /* Only timer set! */
293 SIGNALTIMEOUT (RETRY_OPEN_TIMEOUT_VALUE);
294 }
295 break;
296 case 7:
297 printf("Invalid message code %d passed"
298 " to OPENER_LOST_\n",
299 saSpiBuffer [0]);
300 sError = 0;
301 break;
302 default: /* Includes zero */
303 break;
304 }
305 }
306 break;
307 /* Retry the open */
308 case ZSYS_VAL_SMSG_TIMESIGNAL:
309 /* If open fails, set another timer */
310 if (OpenResponderFile())
311 printf ("Reestablished open of Responder.\n");
312 else
313 {
314 printf ("Retrying again...\n");
315 SIGNALTIMEOUT (RETRY_OPEN_TIMEOUT_VALUE);
316 }
317 break;
318 case ZSYS_VAL_SMSG_OPEN: