*DECK IPISPSI
USETEXT TEXTIPL
PROC IPISPSI;
*CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992.
# TITLE IPISPSI - PROCESS SHUT/INSD SUPERVISORY MESSAGE. #
BEGIN # IPISPSI #
#
**** IPISPSI PROCESS SHUT/INSD SUPERVISORY MESSAGE.
*
* THIS PROCEDURE PROCESSES A SHUT/INSD SUPERVISORY MESSAGE.
*
* PROC IPISPSI
*
* ENTRY P<APSM> = PTR TO SUPERVISORY MESSAGE (*INPBUF*).
*
* EXIT
*
* METHOD IF THE SHUTDOWN REQUEST IS IMMEDIATE, CALL NETOFF.
* IF THE SHUTDOWN REQUEST IS IDLE, ABORT THE OPEN
* CONNECTIONS AND THEN CALL NETOFF.
* STOP THE APPLICATION.
#
#
**** PROC IPISPSI - XREF LIST
#
XREF
BEGIN
PROC IPINITH; # NAM INPUT TRAFFIC HANDLER #
PROC IPPABOS; # ABORT SOCKET #
PROC IPPENDN; # END NETWORK CONNECTION #
PROC MESSAGE; # DISPLAY AND DAYFILE A MESSAGE #
END
#
**
#
ITEM ACN I; # CONNECTION NUMBER #
ITEM ACNSTAT S:SOCKSTAT; # SOCKET STATUS #
ARRAY ENDMSG [00:00] S(3);
BEGIN
ITEM END$TEXT C(00,00,24) = ["IPP-OPERATOR TERMINATED."];
ITEM END$ZBYTE U(02,24,36) = [0];
END
CONTROL EJECT;
#
**** START MAIN PROCEDURE
#
IF NOT SHUTF [0]
THEN
BEGIN # IDLE DOWN REQUESTED #
FOR ACN = MINACN$ STEP 1 UNTIL MAXACN$
DO
BEGIN # ABORT OPEN CONNECTIONS #
IF ACN$CONNECT [ACN]
THEN
BEGIN
IPPABOS (ACN, ACNSTAT);
END
END # ABORT OPEN CONNECTIONS #
BLOCK = FALSE; # NON-BLOCKING MODE FOR INPUT #
FOR ACN = 0
WHILE (NUMACN GR 0)
DO
BEGIN
IPINITH; # CLEAR OUT INPUT QUEUE #
END
END # IDLE DOWN REQUESTED #
MESSAGE (ENDMSG [0], 0);
IPPENDN; # CALL NETOFF TO TERMINATE #
STOP; # CONTROL DOES NOT RETURN #
END # IPISPSI #
TERM