Guardian Application Conversion Guide
Being Opened by and Communicating With a High-PIN Requester
Converting C Applications
5–32 096047 Tandem Computers Incorporated
Using the OPENER_LOST_ Procedure to Maintain an Opener Table
After receiving a status-change message, your server might call one or more routines
to maintain its opener table.
You might want to use the OPENER_LOST_ procedure to maintain your opener table.
OPENER_LOST_ determines whether a status-change message affects your opener
table and updates the appropriate table entry if an opener was lost.
OPENER_LOST_ accepts a C-series (-2 or -8) or D-series (-2, -100, -110, or -113) status-
change message and searches your opener table for any processes affected by the
message. If OPENER_LOST_ determines that an opener has been lost, it updates the
opener-table entry and returns the index of the entry and an
error
value. The
error
value indicates the reason for the opener-table change:
error
Value Reason
4 A backup process opener is lost
5 A primary process opener is lost; the backup process is now the primary process
6 The primary process and backup process (if it exists) openers for a table entry are lost; the
table entry is now free
When OPENER_LOST_ returns an
error
value of zero, processing is complete for the
message.
To process all entries in your opener table for a status-change message, set up a loop
similar to the one shown below. The opener table must be defined as described under
“Defining an Opener Table,” earlier in this subsection.
done = 0; /* Set control for start of loop */
index = -1; /* Set index for start of loop */
do
{
error = OPENER_LOST_(message,message_length,
opener_table.openers,
index,
opener_table.current_count,
$LEN(opener_table.openers));
switch (error)
{
case 4 : /* Processing for lost backup opener */
case 5 : /* Processing for lost primary opener */
case 6 : /* Processing for lost opener */
/* (primary and backup for a process pair) */
default : done = -1 /* Processing is finished or */
/* error occurred */
};
}
while (done == 0);