SPI Programming Manual (G06.24+, H06.03+, J06.03+)

SPI Programming Examples
SPI Programming Manual427506-006
E-87
Example E-20: Routines for C Requesters and
Servers
case 11 : printf ("File System Error on Library File ");
l_len = FNAMECOLLAPSE (&p_program_fname[12], l_err_sbuf);
l_err_sbuf [l_len] = 0;
printf ("%s", l_err_sbuf);
printf (" (ERROR %d)", (p_error & 0x00FF) /* Bits 8-15 */);
break;
case 12 : printf ("Program and Library Files are the Same");
break;
case 13 : printf ("Invalid Segment Size");
break;
case 14 : printf ("File System Error on Initial Setup of Swap File ");
printf (" (ERROR %d)", (p_error & 0x00FF) /* Bits 8-15 */);
break;
case 15 : printf ("Illegal Home Terminal ");
printf (" (ERROR %d)", (p_error & 0x00FF) /* Bits 8-15 */);
break;
case 16 : printf ("I/O Error on Home Terminal ");
printf (" (ERROR %d)", (p_error & 0x00FF) /* Bits 8-15 */);
break;
case 17 : printf ("DEFINE context propagation error");
break;
case 18 : printf ("OBJECT file with an illegal process Device subtype");
break;
case 19 : printf ("process device subtype specified in Backup ");
printf ("Process not the same as that in primary process ");
break;
default : printf ("Unknown Error ");
break;
} /* of switch */
printf ("\n");
} /* of report_newprocess_error() */
#pragma PAGE "restart_server"
/*
*=========================================================================
* Proc : restart_server =
* Function : This procedure will start and re-start the server up to =
* a maximum number to times. =
*=========================================================================
*/
void restart_server(void)
{
short l_process_flags = 0,
l_priority = 0; /* Flag to start up server in INSPECT */
if (srvr_retry_count > 0)
{
printf ("Server restarted\n");
}
srvr_retry_count = srvr_retry_count + 1;
if (srvr_retry_count > 3)
{
printf ("Server restart retries exceeded\n");
STOP();
}
Example E-20. C File: SECRUTLC Supporting Code (page 2 of 4)