*DECK NVFTINA USETEXT TEXTNVF USETEXT TXTANVF USETEXT TXTAPSS PROC NVFTINA; # TITLE NVFTINA - PROCESS TIMER EXPIRED CONDITION (FC/INACT SM) # BEGIN # NVFTINA # # ** NVFTINA - PROCESS TIMER EXPIRED CONDITION (FC/INACT SM) * * E. THAVIKULWAT 81/09/24 * C. BRION 83/04/11 * * THIS PROCEDURE WILL EITHER TERMINATE A LOGIN SESSION OR REATTEMPT * A SWITCH TO AN APPLICATION. THIS ACTION IS DUE TO EXPIRATION OF * NVF'S TIMER. THIS ROUTINE IS CALLED INTO EXECUTION BY PROCEDURE * *NVFTDQE*. * * PROC NVFTINA * * ENTRY: * ABH IN *ABHBUF* * FC/INACT SM IN *MSGBUF* * * EXIT: * ONE OF TWO CONDITIONS: * - A NEW ATTEMPT IS MADE TO SWITCH TO AN APPLICATION, OR * - "TIMEOUT" MESSAGE ISSUED TO THE TERMINAL AND LOGIN SESSION * TERMINATED. A CTR/CHAR MAY BE SENT TO FORCE THE TERMINAL * TO NON-TRANSPARENT INPUT MODE. * * METHOD: * SEARCH PTAC TABLE FOR ENTRY THAT MATCHES THIS TERMINAL'S ACN * AND TIMER CANCELLATION NUMBER. IF ENTRY FOUND, EITHER SEND * "TIMEOUT" MESSAGE AND TERMINATE CONNECTION, OR CALL *NVFTDSP* TO * ATTEMPT TO SWITCH TO THE APPLICATION. IF NO PTAC ENTRY IS * FOUND, IGNORE THE SM. # # **** PROC NVFTINA - XREF LIST. # XREF BEGIN PROC NVFTETC; # END TERMINAL CONNECTION # PROC NVFTDAD; # DETERMINE ADDITIONAL DIALOGUE # PROC NVFTDSP; # DETERMINE SWITCH POSSIBILITY # PROC NVFUMQE; # TRANSFER TEXT TO QUEUE # PROC NVFTILP; # ISSUE LOGIN PROMPT # PROC NVFSCAD; # COMPLETE APPLICATION DEPARTURE # END # **** # *CALL TMSGNVF *CALL TERMCLS ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH # ITEM MATCH B; # EXIT LOOP VARIABLE # ITEM MATCH2 B; # AST MATCH FLAG # ITEM MATCH3 B; # SEC AST ENTRY MATCH FLAG # ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE # ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC # ITEM SORD I; # SECONDARY AST ORDINAL # ITEM PORD I; # PRIMARY AST ORDINAL # ITEM ERRCOD I; # ERROR CODE FOR NVFTDAD CALL # ITEM ASENTRY I; # NUMBER AST ENTRIES # # * DETERMINE NUMBER OF AST ENTRIES. # ASENTRY = ASTLNGTH/ASTSIZ$; # * SEARCH PTAC TABLE FOR ENTRY THAT MATCHES THIS TERMINAL'S ACN * AND TIMER CANCELLATION NUMBER. IF NO MATCH, IGNORE SM. # MATCH = FALSE; MATCH3 = FALSE; MATCH2 = FALSE; NENTRY = PTALNGTH / PTACSIZ$; FOR PT = 0 STEP 1 WHILE (NOT MATCH AND PT LS NENTRY) DO BEGIN IF (PTA$ACN[PT] EQ FCACN[0]) AND (PTA$CNUM[PT] EQ ABHABN[0]) THEN BEGIN # PTAC ENTRY FOUND # MATCH = TRUE; # * CHECK IF TIMEOUT FOR APPLICATION NOT NETTING ON. IF SO, LOCATE THE * PRIMARY AST ENTRY. * CALL NVFSCAD TO COMPLETE APPLICATION DEPARTURE FOR BOTH ENTRIES. # IF PTA$STATE[PT] EQ PTACST"AWTNETP" THEN BEGIN # * LOCATE THE PRIMARY AST ENTRY FOR THIS PTAC ENTRY. # FOR PORD = 0 STEP 1 WHILE ((PORD LS ASENTRY) AND ((NOT MATCH2 AND NOT MATCH3) OR (MATCH2 AND NOT MATCH3) OR (NOT MATCH2 AND MATCH3))) DO BEGIN IF ((AST$PANAM[PORD] EQ PTA$SWTAPP[PT]) AND (AST$PANAM[PORD] EQ AST$SANAM[PORD])) THEN # * PRIMARY AST ENTRY FOUND. # BEGIN NVFSCAD(PORD); MATCH2 = TRUE; END IF ((AST$SANAM[PORD] EQ PTA$SWTAPP[PT]) AND (AST$SANAM[PORD] NQ AST$PANAM[PORD])) THEN # * SECONDARY AST ENTRY FOUND. # BEGIN NVFSCAD(PORD); MATCH3 = TRUE; END END END # * CHECK IF TIMEOUT FOR REATTEMPTING TO SWITCH TO AN APPLICATION. * IF SO, CALL NVFTDSP TO DETERMINE THE SWITCH POSSIBILITY. # IF PTA$STATE[PT] EQ PTACST"AWTAPPL" THEN BEGIN PTA$STATE[PT] = PTACST"AWTVAA"; NVFTDSP(PT,0); GOTO ENDEXIT; END # * CHECK TERMINAL CLASS TO SEE IF NVF SHOULD SEND A CTR/CHAR. # ADDR = PTA$ACN[PT]; GOTO TERMCLS [PTA$TC[PT]]; SENDCTRCHAR: # * SEND CTR/CHAR TO FORCE TERMINAL TO BE IN NON-TRANSPARENT INPUT * MODE. # PFCSFC[1] = CTRCHAR; CTRSTR[1] = 0; # CLEAR REST OF WORD 0 # B<0,16>CTRSTR[1] = NOXPAR$; # ADD FN/FV PAIR FOR NON-XPARENT# NVFUMQE(P,APSM[1],APPPR$,ADDR,LCTRLO$); # TRANSFER TO Q # NOCTRCHAR: # * SEND "TIMEOUT" MESSAGE AND TERMINATE CONNECTION. # NVFUMQE(P,TOUTBUF[0],APPTTX$,ADDR,LMSG20$); # TXT TO Q # # * IF NETON PENDING TYPE OF TIMEOUT, SET UP APPLICATION NOT PRESENT * ERROR CODE AND CALL NVFTDAD TO DETERMINE NEXT DIALOGUE. OTHER- * WISE, END THE CONNECTION. # IF PTA$STATE EQ PTACST"AWTNETP" THEN BEGIN ERRCOD = ECANP$; NVFTDAD(PT,ERRCOD); # * IF CONNECTION AWAITING PROMPT, CALL NVFTILP TO ISSUE PROMPT. # IF PTA$STATE[PT] EQ PTACST"AWTPRMT" THEN NVFTILP(PT); END ELSE NVFTETC(PT); # END TERMINAL CONNECTION # END END ENDEXIT: END # END NVFTINA # TERM