home *** CD-ROM | disk | FTP | other *** search
- *[CORVUS.LIT]*****************************************************************
- * Description: Select Corvus for multi node file locking. *
- * RBBS-PC Level: CPC17.3 √ AM *
- * Module Affected: RBBSSUB2.BAS *
- * Selection Option: MULTINODE = CORVUS *
- * Additional files: None *
- ******************************************************************************
- 21996 CLOSE 1
- OPEN "I",1,ZConfigFileName$
- '
- ' *****************************************************************************
- ' * UNLOCK MESSAGES *
- ' *****************************************************************************
- '
- GOSUB 25000
- CALL OpenMsg
- RETURN
- '
- ' *****************************************************************************
- ' * LOCK MESSAGE FILE *
- ' *****************************************************************************
- '
- 22000 IF ZMsgFileLock = ZTrue THEN _
- RETURN
- ZMsgFileLock = ZTrue
- MID$(ZLockStatus$,1,2) = "LM"
- ZSubParm = 2
- CALL Line25
- ZLockFileName$ = ZActiveMessageFile$
- IF ZNetworkType > 0 THEN GOTO 22200
- RETURN
- 22100
- 22200 CALL BreakFileName (ZActiveMessageFile$,Drive$,Prefix$,Ext$,ZFalse)
- WasCC$ = CHR$(1) + _
- LEFT$(Prefix$ + SPACE$(8),8)
- GOSUB 28000
- IF WasCT = 0 THEN _
- RETURN
- CALL DelayTime (1)
- GOTO 22200
- 22300
- 22400
- 22500
- 25000 IF NOT ZMsgFileLock THEN _
- RETURN
- ZMsgFileLock = ZFalse
- MID$(ZLockStatus$,1,2) = "UM"
- ZSubParm = 2
- CALL Line25
- ZLockFileName$ = ZActiveMessageFile$
- IF ZNetworkType > 0 THEN GOTO 25200
- RETURN
- 25100
- 25200 CALL BreakFileName (ZActiveMessageFile$,Drive$,Prefix$,Ext$,ZFalse)
- WasCC$ = CHR$(17) + _
- LEFT$(Prefix$ + SPACE$(8),8)
- GOSUB 28000
- IF WasCT = 128 THEN _
- RETURN
- CALL DelayTime (1)
- GOTO 25200
- 25300
- 25400
- 25500
- 26000 IF ZUserFileLock = ZTrue THEN _
- RETURN
- ZUserFileLock = ZTrue
- MID$(ZLockStatus$,4,2) = "LU"
- ZSubParm = 2
- CALL Line25
- ZLockFileName$ = ZActiveUserFile$
- IF ZNetworkType > 0 THEN GOTO 26200
- RETURN
- 26100
- 26200 CALL BreakFileName (ZActiveUserFile$,Drive$,Prefix$,Ext$,ZFalse)
- WasCC$ = CHR$(1) + _
- LEFT$(Prefix$ + SPACE$(8),8)
- GOSUB 28000
- IF WasCT = 0 THEN _
- RETURN
- CALL DelayTime (1)
- GOTO 26200
- 26300
- 26500 IF ZUserBlockLock = ZTrue THEN _
- RETURN
- ZUserBlockLock = ZTrue
- ZBlk = (ZUserFileIndex / 4) + .26
- MID$(ZLockStatus$,7,2) = "LB"
- ZSubParm = 2
- CALL Line25
- IF ZNetworkType > 0 THEN GOTO 26700
- RETURN
- 26600
- 26700 WasCC$ = CHR$(1) + _
- "BLK" + _
- RIGHT$("0000" + MID$(STR$(ZBlk),2),5)
- GOSUB 28000
- IF WasCT = 0 THEN _
- RETURN
- CALL DelayTime (1)
- GOTO 26700
- 26750
- 26800
- 26900
- 27000 IF NOT ZUserFileLock THEN _
- RETURN
- ZUserFileLock = ZFalse
- MID$(ZLockStatus$,4,2) = "UU"
- ZSubParm = 2
- CALL Line25
- ZLockFileName$ = ZActiveUserFile$
- IF ZNetworkType > 0 THEN GOTO 27200
- RETURN
- 27100
- 27200 CALL BreakFileName (ZActiveUserFile$,Drive$,Prefix$,Ext$,ZFalse)
- WasCC$ = CHR$(17) + _
- LEFT$(Prefix$ + SPACE$(8),8)
- GOSUB 28000
- IF WasCT = 128 THEN _
- RETURN
- CALL DelayTime (1)
- GOTO 27200
- 27300
- 27500 IF NOT ZUserBlockLock THEN _
- RETURN
- ZUserBlockLock = ZFalse
- ZBlk = (ZUserFileIndex / 4) + .26
- MID$(ZLockStatus$,7,2) = "UB"
- ZSubParm = 2
- CALL Line25
- IF ZNetworkType > 0 THEN GOTO 27700
- RETURN
- 27600
- 27700 WasCC$ = CHR$(17) + _
- "BLK" + _
- RIGHT$("0000" + MID$(STR$(ZBlk),2),5)
- GOSUB 28000
- IF WasCT = 128 THEN _
- RETURN
- CALL DelayTime (1)
- GOTO 27700
- 27750
- 27800
- 27900
- 28000 WasCC$ = ZLineFeed$ + _
- CHR$(0) + _
- CHR$(11) + _
- WasCC$
- CALL CDSend(WasCC$)
- CALL CDRecv(ZWasCN$)
- WasCT = ASC(MID$(ZWasCN$,3,1))
- IF WasCT => 128 THEN _
- CALL LPrnt("CORVUS LOCK FAIL",1) : _
- ZSubParm = -1
- 28010 WasCT = ASC(MID$(ZWasCN$,4,1))
- IF WasCT => 129 THEN _
- CALL LPrnt("CORVUS FULL",1) : _
- ZSubParm = -1
- RETURN
- 28100
- 29000 IF LockedEn$ = ZWasEN$ THEN _
- RETURN
- LockedEn$ = ZWasEN$
- MID$(ZLockStatus$,10,2) = "LD"
- ZSubParm = 2
- CALL Line25
- ZLockFileName$ = ZWasEN$
- IF ZNetworkType > 0 THEN GOTO 29010
- 29010 RETURN
- 29100
- 29300
- 29500 IF LockedEn$ <> ZWasEN$ THEN _
- RETURN
- LockedEn$ = ""
- MID$(ZLockStatus$,10,2) = "UD"
- ZSubParm = 2
- CALL Line25
- ZLockFileName$ = ZWasEN$
- 29510 RETURN
- 29600
- 29650
- 29700
- 29710
- 29720
- 29730
- 29800
- 29810
- 29820
- 29830 END SUB
- 30000 SUB InitIBM STATIC
- END SUB
- 30020
-