User Tools

Site Tools


cdc:nos2.source:nam5871:nvftrvd

NVFTRVD

Table Of Contents

  • [00007] PROC NVFTRVD
  • [00008] NVFTRVD - RECEIVE VCB DATA
  • [00012] RECEIVE VCB DATA.
  • [00067] PROC NVFSCAD
  • [00068] PROC NVFTCCT
  • [00069] PROC NVFTCRN
  • [00070] PROC NVFTETC
  • [00071] PROC NVFTIAM
  • [00072] PROC NVFTILP
  • [00073] PROC NVFTRLC
  • [00074] PROC NVFTURT
  • [00075] PROC NVFUMQE
  • [00076] PROC SSCATR
  • [00077] PROC SSTRTS
  • [00078] FUNC XCDD
  • [00087] PROC MESSAGE
  • [00098] DAYMSG - TERMINAL CLASS CHANGED MESSAGE BUFFER
  • [00115] CABBUF - CONNECTION ABORTED MESSAGE BUFFER.
  • [00124] TRBBUF - TIMER REQUEST BUFFER

Source Code

NVFTRVD.txt
  1. *DECK NVFTRVD
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXTANVF
  5. USETEXT TXTAPSS
  6. USETEXT TXSMNVF
  7. PROC NVFTRVD;
  8. # TITLE NVFTRVD - RECEIVE VCB DATA #
  9.  
  10. BEGIN # NVFTRVD #
  11. #
  12. ** NVFTRVD - RECEIVE VCB DATA.
  13. *
  14. * E. THAVIKULWAT 81/11/13
  15. * C. BRION 82/04/11. 83/05/10.
  16. *
  17. * THIS PROCEDURE'S MAIN FUNCTION IS TO PROCESS VCB DATA AND DETERMIN
  18. * APPROPRIATE ACTIONS TO TAKE DEPENDING ON WHAT PROCESS REQUESTED TH
  19. * DATA. IT IS CALLED INTO EXECUTION BY PROCEDURE *NVFTDQE*.
  20. *
  21. * PROC NVFTRVD
  22. *
  23. * ENTRY:
  24. * VCB DATA IN *MSGBUF*
  25. *
  26. * EXIT:
  27. * ONE OF THE FOLLOWING:
  28. * 1) APPLICATION PROMPT REISSUED.
  29. * 2) CONNECTION SWITCHED TO APPROPRIATE APPLICATION.
  30. * 3) CONNECTION TERMINATED.
  31. * 4) A TIMER IS STARTED FOR NVF TO REATTEMPT TO SWITCH TO THE
  32. * APPROPRIATE APPLICATION.
  33. *
  34. * NOTES:
  35. * 1) IF THE RECONNECT PROCESS REQUESTED THE DATA BECAUSE OF AN
  36. * APPLICATION FAILURE, APPLICATION PROMPT IS NOT REISSUED IF
  37. * THE FAILED APPLICATION IS A MANDATORY/IMPLIED MANDATORY
  38. * APPLICATION.
  39. * 2) FOR A NORMAL RECONNECT, THE USER IS REVALIDATED, WITHOUT
  40. * INCREMENTING FAMILY COUNT, WHETHER OR NOT A NEW APPLICATION
  41. * IS SPECIFIED.
  42. *
  43. * METHOD:
  44. * CALL *NVFTURT* TO GET A *PTAC* ENTRY THAT MATCHES ON VCB AND
  45. * UPDATE *RAU* TABLE IF NEEDED. SAVE VCB DATA IN APPROPRIATE
  46. * FIELDS OF THE *PTAC* AND ISSUE *AEAP* ACCOUNT DAYFILE MESSAGE.
  47. * IF DEVICE IS A PASSIVE DEVICE OR VCB DATA WAS REQUESTED BY THE
  48. * CONNECTION BROKEN PROCESS, THEN TERMINATE THE CONNECTION.
  49. * OTHERWISE, DATA WAS REQUESTED BY THE RECONNECT PROCESS. IF THE
  50. * RECONNECT IS DUE TO APPLICATION FAILED CONDITION AND THE FAILED
  51. * APPLICATION IS A MANDATORY/IMPLIED MANDATORY APPLICATION, THEN
  52. * CHECK IF THIS IS A CONSOLE WITH ALL MANDATORY LOGIN PARAMETERS.
  53. * IF SO, START UP A 30-SECOND TIMER, AT THE END OF WHICH NVF WILL
  54. * REATTEMPT TO CONNECT TO THE FAILED APPLICATION. IF NOT, THEN
  55. * TERMINATE THE CONNECTION. IF THE RECONNECT IS NOT DUE TO THE
  56. * APPLICATION FAILED CONDITION, OR IF THE FAILED APPL IS NOT
  57. * MANDATORY OR IMPLIED MANDATORY, THEN REVALIDATE THE USER WITHOUT
  58. * INCREMENTING THE FAMILY COUNT.
  59. #
  60.  
  61. #
  62. **** PROC NVFTRVD - XREF LIST.
  63. #
  64.  
  65. XREF
  66. BEGIN
  67. PROC NVFSCAD; # COMPLETE APPLICATION DEPARTURE #
  68. PROC NVFTCCT; # CALCULATE CONNECT TIME #
  69. PROC NVFTCRN; # CHECK FOR RESERVED APPLICATION NAME #
  70. PROC NVFTETC; # END TERMINAL CONNECTION #
  71. PROC NVFTIAM; # ISSUE ACCOUNT DAYFILE MESSAGE #
  72. PROC NVFTILP; # ISSUE LOGIN PROMPT #
  73. PROC NVFTRLC; # REFUSE LOANED CONNECTION #
  74. PROC NVFTURT; # UPDATE *RAU* TABLE IF NEEDED #
  75. PROC NVFUMQE; # TRANSFER TEXT TO QUEUE #
  76. PROC SSCATR; # ACCEPT TIMER REQUEST #
  77. PROC SSTRTS; # REMOVE TABLE SPACE #
  78. FUNC XCDD; # MACREL CONVERT INTEGER TO DISPLAY DEC #
  79. END
  80.  
  81. #
  82. ****
  83. #
  84. $BEGIN
  85. XREF
  86. BEGIN
  87. PROC MESSAGE; # SEND MESSAGE TO SYSTEM AND USER DAYFILE #
  88. END
  89. $END
  90. #
  91. ****
  92. #
  93.  
  94. *CALL TMSGNVF
  95.  
  96. *CALL TERMCLS
  97. #
  98. ** DAYMSG - TERMINAL CLASS CHANGED MESSAGE BUFFER
  99. #
  100. ARRAY DAYMSG[00:00] S(8);
  101. BEGIN
  102. ITEM DAY$MSG1 C(00,00,33) =
  103. ["INVALID TERMINAL CLASS TRANSITION"];
  104. ITEM DAY$MSG2 C(03,18,10) = [" OLD TC = "];
  105. ITEM DAY$OLDT U(04,18,18); # OLD TERMINAL CLASS #
  106. ITEM DAY$MSG3 C(04,36,10) = [" NEW TC = "];
  107. ITEM DAY$NEWT U(05,36,18); # NEW TERMINAL CLASS #
  108. ITEM DAY$MSG4 C(05,54,12) = [" TERMNAME = "];
  109. ITEM DAY$TNAM C(07,06,07); # TERMINAL NAME #
  110. ITEM DAY$DOT C(07,48,01) = ["."];
  111. END
  112.  
  113.  
  114. #
  115. ** CABBUF - CONNECTION ABORTED MESSAGE BUFFER.
  116. #
  117. ARRAY CABBUF [00:00] S(3);
  118. BEGIN
  119. ITEM CAB$MSG C(00,00,21) = [".CONNECTION ABORTED. "];
  120. END
  121.  
  122.  
  123. #
  124. ** TRBBUF - TIMER REQUEST BUFFER
  125. *
  126. * BUFFER CONTAINING TIMER INFORMATION. BUFFER IS SET UP TO CONTAIN
  127. * THE FC/INACT SM WHICH IS RETURNED TO THE *TAINPQ* WHEN THE TIMER
  128. * EXPIRES.
  129. #
  130. ARRAY TRBBUF [00:00] S(TMBSIZ$);
  131. BEGIN
  132. ITEM TRB$SMID S:CTQSTAT(00,00,12) = [S"SINA"]; #INTERNAL ID#
  133. ITEM TRB$WC U(00,48,12) = [TMBSIZ$]; # ENTRY SIZE #
  134. ITEM TRB$ABT U(01,00,06) = [APPCMD]; # APPL BLOCK TYPE #
  135. ITEM TRB$CNUM U(01,18,18); # CANCELLATION NUM #
  136. ITEM TRB$PFCSFC U(02,00,16) = [FCINA]; # FC/INACT PFCSFC #
  137. ITEM TRB$ACN U(02,24,12); # APPL CONN NUMBER #
  138. ITEM TRB$DELAY U(03,24,18) = [RTRYTIME$];# DELAY TIME IN SEC #
  139. ITEM TRB$QNUM U(03,42,18); # Q NUM FOR FC/INACT#
  140. END
  141.  
  142. ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
  143. ITEM AS I; # APPLICATION STATUS TABLE ORDINAL #
  144. ITEM ASENTRY I; # NUMBER OF AST ENTRIES #
  145. ITEM CNTIME C(10); # VARIABLE TO RECEIVE CONNECT TIME #
  146. ITEM CNTYP I; # CONNECTION TYPE INDICATOR #
  147. ITEM MATCH B; # EXIT LOOP VARIABLE #
  148. ITEM NENTRY I; # NUMBER OF ENTRIES IN TABLE #
  149. ITEM PORD I; # PRIMARY AST ENTRY ORDINAL #
  150. ITEM PRIAPP B; # PRIMARY APPLICATION INDICATOR #
  151. ITEM PT I; # SUBSCRIPT FOR ARRAY PTAC #
  152. ITEM RNAME I; # RESERVED NAME INDICATOR #
  153. ITEM SMOUT B; # SM OUTPUT TYPE FOR NVFTRLC CALL #
  154. ITEM VCBLOC I; # LOCAL VCB ORDINAL #
  155.  
  156.  
  157. CONTROL EJECT;
  158.  
  159. #
  160. * DETERMINE NUMBER OF AST ENTRIES
  161. #
  162. ASENTRY = ASTLNGTH/ASTSIZ$;
  163.  
  164. #
  165. * CALL *NVFTURT* TO FIND THE *PTAC* ENTRY AND UPDATE *RAU* TABLE IF
  166. * NEEDED. SAVE VCB DATA THAT APPLIES TO BOTH PASSIVE AND INTERACTIV
  167. * DEVICE IN THE *PTAC*.
  168. #
  169. P<VCBBUF> = LOC(MSGBUF[0]); # LOCATION OF VCB DATA BUFFER #
  170. #
  171. * SEARCH PTAC TABLE FOR ENTRY THAT MATCHES ON VCB.
  172. #
  173. MATCH = FALSE;
  174. NENTRY = PTALNGTH / PTACSIZ$; # CALCULATE NUMBER OF ENTRIES #
  175. FOR PT = 0 STEP 1 WHILE (NOT MATCH AND PT LS NENTRY)
  176. DO
  177. BEGIN
  178. IF PTA$VCB[PT] EQ VCB$VCB[0]
  179. THEN # PTAC ENTRY FOUND #
  180. BEGIN
  181. MATCH = TRUE; # EXIT LOOP #
  182. END
  183. END
  184.  
  185. PT = PT - 1;
  186.  
  187.  
  188. PTA$TN[PT] = VCB$TN[0];
  189. PTA$HW[PT] = VCB$HW[0];
  190. PTA$VTP[PT] = VCB$VTP[0];
  191. PTA$CACA[PT] = VCB$CACA[0];
  192. PTA$ICF[PT] = VCB$ICF[0];
  193. PTA$RCNA[PT] = VCB$RCNA[0];
  194. PTA$NET[PT] = VCB$NET[0];
  195. PTA$LCF[PT] = VCB$LCF[0];
  196. PTA$ALIF[PT] = VCB$ALIF[0];
  197. PTA$SDT[PT] = VCB$SDT[0];
  198. PTA$DO[PT] = VCB$DO[0];
  199. PTA$XBZ[PT] = VCB$XBZ[0];
  200. PTA$SL[PT] = VCB$SL[0];
  201. PTA$DBZ[PT] = VCB$DBZ[0];
  202. PTA$UBZ[PT] = VCB$UBZ[0];
  203. PTA$CNTIME[PT] = VCB$CNTIME[0];
  204. PTA$SWTIME[PT] = VCB$SWTIME[0];
  205. PTA$FWORD[PT] = VCB$FWORD[0];
  206. PTA$UWORD[PT] = VCB$UWORD[0];
  207. PTA$PROMPT[PT] = AWTAPP$;
  208.  
  209. #
  210. * IF VCB DATA WAS REQUESTED BECAUSE OF CONNECTION BROKEN, USE
  211. * THE ORIGINAL TERMINAL CLASS FROM VCB TO AVOID THE SEARCH FOR
  212. * PDCT ENTRY IN CASE THE TERMINAL CLASS HAS BEEN CHANGED
  213. * ERRONEOUSLY FROM AN ASYN TYPE TO A SYNCHRONOUS ONE.
  214. #
  215. IF PTA$STATE[PT] EQ PTACST"AWTVCBC"
  216. THEN
  217. PTA$TC[PT] = VCB$TC[0];
  218.  
  219. #
  220. * IF VCB DATA WAS REQUESTED BECAUSE OF CR/RCN, COMPARE THE
  221. * ORGINAL TERMINAL CLASS WITH THE ONE FROM CR/RCN SM. IF
  222. * TC IS CHANGED FROM ASYNC TO SYNC, SEND OUT THE MESSAGE
  223. * AND END TERMINAL CONNECTION.
  224. #
  225. IF PTA$STATE[PT] EQ PTACST"AWTVCBR"
  226. AND PTA$TC[PT] GQ TC9$
  227. AND VCB$TC[0] LS TC9$
  228. THEN
  229. BEGIN
  230.  
  231. $BEGIN
  232. DAY$OLDT[0] = XCDD(VCB$TC[0]+1000);
  233. DAY$NEWT[0] = XCDD(PTA$TC[PT]+1000);
  234. DAY$TNAM[0] = PTA$TN[PT];
  235. MESSAGE(DAYMSG,0);
  236. $END
  237.  
  238. PTA$TC[PT] = VCB$TC[0];
  239. NVFTETC(PT);
  240. RETURN;
  241. END
  242.  
  243. #
  244. * IF THE PRIMARY APPL NUMBER IN THE *PTAC* IS ZERO, THEN MOVE THE
  245. * PRIMARY APPL NUMBER FROM THE *VCB* TO THE *PTAC*. (IF PTA$PRIAN
  246. * IS NON-ZERO, IT MAY HAVE JUST BEEN SET, AND WE DON'T WANT TO
  247. * OVERWRITE IT.)
  248. #
  249. IF PTA$PRIAN[PT] EQ 0
  250. THEN
  251. BEGIN
  252. PTA$PRIAN[PT] = VCB$PRIAN[0];
  253. END
  254. #
  255. * ISSUE *AEAP* ACCOUNT DAYFILE MESSAGE.
  256. #
  257. NVFTIAM(PT,AEAP$);
  258. #
  259. * IF THIS CR/RCN IS NOT THE RESULT OF A PREVIOUS CR/RCN/A BEING
  260. * SENT, THEN THE NUMBER OF T-A CONNECTIONS FOR THE APPLICATION TO
  261. * WHICH THIS TERMINAL WAS CONNECTED MUST BE DECREMENTED. IF THE
  262. * NUMBER OF CONNECTIONS TO THAT APPLICATION IS NOW ZERO AND THAT
  263. * APPLICATION HAS FAILED OR NETTED OFF, THE APPROPRIATE RESPONSE
  264. * SM (FAIL/APPL/N OR NET/OFF/N) MUST BE ISSUED.
  265. #
  266. IF NOT PTA$RCNA[PT]
  267. THEN
  268. BEGIN
  269. PRIAPP = FALSE;
  270. NVFTURT(VCB$VCB[0],PT,PRIAPP); # UPDATE *RAU* TABLE #
  271.  
  272. FOR AS = 0 STEP 1 WHILE
  273. (AS LS ASENTRY AND
  274. AST$PANAM[AS] NQ PTA$SWTAPP[PT])
  275. DO
  276. BEGIN
  277. END
  278. AST$TACN[AS] = AST$TACN[AS] - 1;
  279. AST$ICCN[AS] = AST$ICCN[AS] - 1;
  280. NVFSCAD(AS);
  281. #
  282. * IF THIS IS AN INITIAL LOAN AND THE CONNECTION HAS NOT BEEN BROKEN,
  283. * INCREMENT THE NUMBER OF RESERVED CONNECTIONS FOR THIS APPL.
  284. #
  285. IF (PTA$LRC[PT] EQ RCRC"LSA") AND
  286. (PTA$STATE[PT] NQ PTACST"AWTVCBC")
  287. THEN
  288. BEGIN
  289. AST$RACN[AS] = AST$RACN[AS] + 1;
  290. END
  291. END
  292. #
  293. * CLEAR THE CR/RCN/A FLAG IN THE PTAC. THIS FLAG HELPS NVF TO
  294. * DISTINGUISH BETWEEN A NORMAL CR/RCN AND A CR/RCN THAT IS THE
  295. * RESULT OF NVF SENDING A CR/RCN/A TO NIP.
  296. #
  297. PTA$RCNA[PT] = FALSE;
  298. #
  299. * DETERMINE PROCESS (CONNECTION BROKEN OR RECONNECT) THAT REQUESTED
  300. * THE DATA.
  301. #
  302. IF ((PTA$DT[PT] NQ DT$CONS) AND (PTA$DT[PT] NQ DT$USER))
  303. OR (PTA$STATE[PT] EQ PTACST"AWTVCBC")
  304. THEN # PASSIVE DEVICE OR CONNECTION BROKEN #
  305. BEGIN
  306. #
  307. * CHECK IF CONNECTION THAT WAS LOANED.
  308. * IF SO, THEN THE CONNECTION COUNT FOR THE PRIMARY APPL MUST
  309. * BE DECREMENTED.
  310. #
  311. IF PTA$LCF[PT] # IF LOAN CONNECTION #
  312. THEN
  313. BEGIN
  314. PRIAPP = TRUE;
  315. NVFTURT(VCB$VCB[0],PT,PRIAPP); # UPDATE *RAU* TABLE #
  316.  
  317. FOR AS = 0 STEP 1 WHILE
  318. ((AS LS ASENTRY) AND
  319. (AST$AN[AS] NQ PTA$PRIAN[PT]))
  320. DO
  321. BEGIN
  322. END
  323. IF AS LS ASENTRY
  324. THEN
  325. BEGIN
  326. AST$RACN[AS] = AST$RACN[AS] - 1;
  327. PTA$LCF[PT] = FALSE; # CLEAR THE LCF FLAG #
  328. NVFSCAD(AS);
  329. END
  330. END
  331.  
  332. #
  333. * CONNECTION BROKEN AND/OR PASSIVE DEVICE, TERMINATE THE
  334. * CONNECTION.
  335. #
  336. NVFTETC(PT);
  337. END
  338. ELSE # RECONNECT FOR INTERACTIVE DEVICE #
  339. BEGIN
  340. ADDR = PTA$ACN[PT];
  341. VCBLOC = PTA$VCB[PT];
  342. #
  343. * DATA REQUESTED BY THE RECONNECT PROCESS. SAVE VCB DATA THAT
  344. * APPLIES TO INTERACTIVE DEVICES IN THE *PTAC*.
  345. #
  346. PTA$ALIFAM[PT] = VCB$ALIFAM[0];
  347. PTA$FAMIND[PT] = VCB$FAMIND[0];
  348. PTA$ALIUSR[PT] = VCB$ALIUSR[0];
  349. PTA$USRIND[PT] = VCB$USRIND[0];
  350. PTA$ALIAPP[PT] = VCB$ALIAPP[0];
  351. PTA$APPIND[PT] = VCB$APPIND[0];
  352. #
  353. * SETUP APPLICATION CONNECT TIME MESSAGE.
  354. #
  355. CTM$ANAME[0] = PTA$SWTAPP[PT]; # APPLICATION NAME #
  356. CNTYP =TATIME$;
  357. NVFTCCT(PT,1,CNTIME,CNTYP); # CALC CONNECT TIME #
  358. CTM$TIME[0] = CNTIME; # SAVE CONNECT TIME #
  359. #
  360. * DETERMINE IF RECONNECT IS DUE TO APPLICATION FAILED CONDITION.
  361. * ON A NON-LOANED TYPE OF RECONNECTION.
  362. #
  363. IF PTA$AFF[PT]
  364. THEN # APPL FAILED WITH OUTSTANDING CONN #
  365. BEGIN
  366. #
  367. * APPLICATION FAILED. SEND "APPLICATION FAILED" MESSAGE.
  368. #
  369. NVFUMQE(P<CTQ>,APFBUF[0],APPTTX$,ADDR,LMSG30$);
  370. #
  371. * CHECK TERMINAL CLASS TO SEE IF NVF SHOULD SEND A CTR/CHAR.
  372. #
  373. GOTO TERMCLS [PTA$TC[PT]];
  374.  
  375. SENDCTRCHAR:
  376.  
  377. #
  378. * SEND CTR/CHAR TO FORCE TERMINAL TO BE IN NON-TRANSPARENT
  379. * INPUT MODE.
  380. #
  381. PFCSFC[1] = CTRCHAR;
  382. CTRSTR[1] = 0; # CLEAR REST OF WORD 0 #
  383. B<0,16>CTRSTR[1] = NOXPAR$; # ADD FN/FV PAIR FOR NON-XPARENT#
  384. NVFUMQE(P<CTQ>,APSM[1],APPPR$,ADDR,LCTRLO$); # TRANSFER TO Q#
  385.  
  386. NOCTRCHAR:
  387.  
  388. #
  389. * IF FAILED APPLICATION IS MANDATORY/IMPLIED MANDATORY,
  390. * TERMINATE THE CONNECTION. OTHERWISE, PROCEED TO REVALIDATE
  391. * THE USER AND ISSUE APPLICATION PROMPT.
  392. #
  393. IF (((PTA$APPIND[PT] EQ MNDATRY$)
  394. OR (VCB$VDSF[0])) AND PTA$LRC[PT] LS RCRC"LSA")
  395. THEN # MANDATORY/IMPLIED MANDATORY APPL FAILED #
  396. BEGIN
  397. #
  398. * SEND "CONNECT TIME" MESSAGE.
  399. #
  400. NVFUMQE(P<CTQ>,CTMEBUF[0],APPTTX$,ADDR,LMSG40$);
  401. #
  402. * IF THIS IS A CONSOLE DEVICE TYPE WITH ALL MANDATORY LOGIN
  403. * PARAMETERS, START A 30 SECOND TIMER SO THAT NVF CAN TRY TO
  404. * RECONNECT THE CONSOLE TO THE DESIRED APPLICATION.
  405. #
  406. IF (PTA$DT[PT] EQ DT$CONS) AND
  407. (PTA$FAMIND[PT] EQ MNDATRY$) AND
  408. (PTA$USRIND[PT] EQ MNDATRY$) AND
  409. (PTA$APPIND[PT] EQ MNDATRY$)
  410. THEN
  411. BEGIN
  412. TRB$ACN[0] = PTA$ACN[PT];
  413. TRB$QNUM[0] = LOC(P<TAINPQ>);
  414. SSCATR(TRBBUF[0]);
  415. PTA$CNUM[PT] = TRB$CNUM[0];
  416. PTA$STATE[PT] = PTACST"AWTAPPL";
  417. END
  418. #
  419. * IF NON-CONSOLE OR NON-MANDATORY LOGIN PARAMETERS, SEND THE
  420. * LOGGED OUT MESSAGE AND END TERMINAL CONNECTION.
  421. #
  422. ELSE
  423. BEGIN
  424. NVFUMQE(P<CTQ>,LOMBUF[0],APPTTX$,ADDR,LMSG20$);
  425. NVFTETC(PT); # END TERMINAL CONNECTION #
  426. END
  427. RETURN; # EXIT #
  428. END
  429. END
  430.  
  431. #
  432. * CHECK STATE OF PTAC. IF DUE TO LOANED REQUEST TYPE OF
  433. * RECONNECT, CHECK THE DIFFERENT REASON CODES TO DETERMINE
  434. * NEXT ACTION.
  435. #
  436.  
  437. IF PTA$STATE[PT] EQ PTACST"AWTVCBL"
  438. THEN
  439. BEGIN
  440. PTA$LCF[PT] = TRUE; # SET LCF FIRST #
  441. #
  442. * IF THE PRIMARY APPL FAILED OR THE SECONDARY APPL ABORTED THE
  443. * CONNECTION, CLEAR THE LOAN CONNECTION FIELD IN THE PTAC, SINCE
  444. * THIS IS NO LONGER A LOANED CONNECTION. CLEAR THE VOLUNTEERED
  445. * APPL FLAG SO THE APPLICATION PROMPT WILL BE SENT. SEND EITHER
  446. * THE "CONNECTION ABORTED" OR "APPLICATION FAILED" MESSAGE.
  447. #
  448. IF (PTA$LRC[PT] EQ RCRC"PAF") OR
  449. (PTA$LRC[PT] EQ RCRC"SAC")
  450. THEN
  451. BEGIN
  452. PTA$LRC[PT] = 0;
  453. PTA$LCF[PT] = FALSE;
  454. PTA$VAF[PT] = FALSE;
  455. IF PTA$LRC[PT] EQ RCRC"SAC"
  456. THEN
  457. BEGIN
  458. #
  459. * LOCATE THE PRIMARY AST ENTRY AND DECREMENT THE RESERVED
  460. * CONNECTION COUNT. UPDATE THE *RAU* TABLE, IF NEEDED.
  461. #
  462. PRIAPP = TRUE;
  463. NVFTURT(VCB$VCB[0],PT,PRIAPP); # UPDATE *RAU* TABLE #
  464.  
  465. FOR AS = 0 STEP 1 WHILE
  466. (AS LS ASENTRY AND
  467. AST$AN[AS] NQ PTA$PRIAN[PT])
  468. DO
  469. BEGIN
  470. END
  471. IF AS LS ASENTRY
  472. THEN
  473. BEGIN
  474. AST$RACN[AS] = AST$RACN[AS] - 1;
  475. NVFSCAD(AS);
  476. END
  477. NVFUMQE(P<CTQ>,CABBUF[0],APPTTX$,ADDR,LMSG30$);
  478. END
  479. ELSE
  480. BEGIN
  481. NVFUMQE(P<CTQ>,APFBUF[0],APPTTX$,ADDR,LMSG30$);
  482. END
  483. END
  484.  
  485. #
  486. * IF SWITCHING BACK TO PRIMARY, BUT THE PRIMARY APPLICATION NAME
  487. * IS NOT SPECIFIED, THE PRIMARY APPL MUST HAVE FAILED. IN THIS
  488. * CASE, THE LOAN CONNECTION IS ENDED. DECREMENT THE NUMBER OF
  489. * RESERVED CONNECTIONS FOR THE PRIMARY APPL. UPDATE THE *RAU*
  490. * TABLE, IF NECESSARY.
  491. #
  492. IF (PTA$LRC[PT] GQ RCRC"UVS" AND
  493. PTA$LRC[PT] LQ RCRC"SLE") AND
  494. NOT PTA$VAF[PT]
  495. THEN
  496. BEGIN
  497. PTA$LRC[PT] = 0;
  498. PTA$LCF[PT] = FALSE;
  499. PRIAPP = TRUE;
  500. NVFTURT(VCB$VCB[0],PT,PRIAPP);
  501.  
  502. FOR AS = 0 STEP 1 WHILE
  503. ((AS LS ASENTRY) AND
  504. (AST$AN[AS] NQ PTA$PRIAN[PT]))
  505. DO
  506. BEGIN
  507. END
  508. IF AS LS ASENTRY
  509. THEN
  510. BEGIN
  511. AST$RACN[AS] = AST$RACN[AS] - 1;
  512. NVFSCAD(AS);
  513. END
  514. END
  515. END
  516. #
  517. * NORMAL RECONNECT OR NON-MANDATORY APPLICATION FAILED. SEND
  518. * "CONNECT TIME" MESSAGE. DETERMINE IF NEW APPLICATION SPECIFIED.
  519. * IF NO NEW APPLICATION SPECIFIED AND THE PREVIOUS APPLICATION
  520. * IS A MANDATORY/IMPLIED MANDATORY APPLICATION, TERMINATE THE
  521. * CONNECTION.
  522. #
  523. IF PTA$LRC[PT] LS RCRC"LSA"
  524. THEN
  525. NVFUMQE(P<CTQ>,CTMEBUF[0],APPTTX$,ADDR,LMSG40$);
  526. IF PTA$VAF[PT]
  527. THEN
  528. BEGIN
  529. NVFTCRN(PT,RNAME);
  530. IF (RNAME NQ NORESNAM$)
  531. THEN
  532. BEGIN
  533. IF RNAME EQ LOGIN$
  534. THEN
  535. BEGIN
  536. #
  537. * HAVE RESERVED APPLICATION NAME OF "HELLO" OR "LOGIN".
  538. * CHECK IF LOAN REQUEST TYPE OF CONNECTION IN WHICH CASE THE
  539. * RESERVED APPL NAMES ARE NOT ALLOWED.
  540. * SET UP TO ISSUE CR/RCN/A SM VIA CALL TO NVFTRLC.
  541. #
  542. IF PTA$LRC[PT] EQ RCRC"LSA"
  543. THEN
  544. BEGIN
  545. SMOUT = TRUE;
  546. PTA$LRC[PT] = RCRC"SNA";
  547. NVFTRLC(PT,SMOUT,PTA$LRC[PT]);
  548. RETURN;
  549. END
  550. IF PTA$LRC[PT] LS RCRC"LSA"
  551. THEN
  552. BEGIN
  553. NVFTILP(PT);
  554. END
  555. END
  556. #
  557. * FOR ALL RESERVED APPLICATION NAMES, RETURN. IF THE APPLICATION
  558. * NAME WAS "BYE" OR "LOGOUT", NVF WILL HAVE ALREADY TERMINATED
  559. * THE CONNECTION.
  560. #
  561. RETURN;
  562. END
  563. END
  564. ELSE
  565. BEGIN
  566. #
  567. * NO NEW APPLICATION SPECIFIED.
  568. * IF A LOAN REQUEST TYPE OF RECONNECT, THEN INVALID RECONNECT
  569. * FROM PRIMARY TO SECONDARY APPLICATION.
  570. * SET UP TO ISSUE A CR/RCN/A SM VIA CALL TO NVFTRLC.
  571. #
  572. IF PTA$LRC[PT] EQ RCRC"LSA"
  573. THEN
  574. BEGIN
  575. SMOUT = TRUE;
  576. PTA$LRC[PT] = RCRC"SNA";
  577. NVFTRLC(PT,SMOUT,PTA$LRC[PT]);
  578. RETURN;
  579. END
  580. ELSE
  581. BEGIN
  582. IF (PTA$APPIND[PT] EQ MNDATRY$)
  583. OR (VCB$VDSF[0])
  584. THEN
  585. BEGIN
  586. NVFUMQE(P<CTQ>,LOMBUF[0],APPTTX$,ADDR,LMSG20$);
  587. NVFTETC(PT);
  588. RETURN;
  589. END
  590. END
  591. END
  592.  
  593.  
  594. #
  595. * WHETHER OR NOT NEW APPLICATION IS SPECIFIED, REVALIDATE THE USER
  596. * (CPM 56B REQUEST) WITHOUT INCREMENTING THE FAMILY COUNT.
  597. #
  598. P<CRQBUF> = LOC(MSGBUF[0]) + ((NMSGBUF$ + 1) / 2);
  599. CRQ$FCWORD[0] = 0; # CLEAR OUTPUT HALF OF *MSGBUF* #
  600. CRQ$FWORD[0] = 0;
  601. CRQ$PWORD[0] = 0;
  602. CRQ$UWORD[0] = 0;
  603.  
  604. CRQ$FC[0] = CPM56B$;
  605. CRQ$ACN[0] = VCBLOC;
  606. CRQ$FNAM[0] = PTA$FNAM[PT];
  607. CRQ$VPWF[0] = TRUE;
  608. CRQ$IFCTF[0] = FALSE;
  609. CRQ$UNUM[0] = PTA$UNUM[PT];
  610. CRQ$QNUM[0] = LOC(P<VDATAQ>);
  611. NVFUMQE(P<CPMRQ>,CRQBUF[0],APPTTX$,0,LMSG40$);
  612. PTA$STATE[PT] = PTACST"AWTVAL"; # AWAIT VALIDATION STATE #
  613. PTA$PROMPT[PT] = AWTFAM$; # SET TO AWAIT FAMILY #
  614. PTA$USERCT[PT] = LLVAL; # FORCE LOGOUT IF UNSUCCESSFUL #
  615. PTA$PWEXPF[PT] = TRUE; # DO NOT REISSUE PW EXP MESSAGE #
  616. END
  617.  
  618. END # END NVFTRVD #
  619.  
  620. TERM
cdc/nos2.source/nam5871/nvftrvd.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator