From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 19-DEC-1990 15:24:10.68
To:	MRGATE::"ARISIA::EVERHART"
CC:	
Subj:	lkstat - last minute correction

Received:  by crdgw1.ge.com (5.57/GE 1.80)
	 id AA20309; Wed, 19 Dec 90 14:49:28 EST
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Wed, 19 DEC 90 10:26:33 PST
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA06155; Wed, 19 Dec 90 10:15:46 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 19 Dec 90 13:42:36 GMT
From: mcsun!cernvax!chx400!cgch!fizciba-geigy.ch!bnebga@uunet.uu.net  (Gary Nebbett)
Organization: Ciba-Geigy AG, Basel, Switzerland
Subject: lkstat - last minute correction
Message-Id: <1990Dec19.143310@fizciba-geigy.ch>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

It appears that the field RSB$B_CGMODE of an RSB sometimes
contains a value outside the range LCK$K_NLMODE to
LCK$K_EXMODE, and this causes the code that uses this
field as an index into an array to fail.

To make lkstat more robust, you should add
#include <lckdef.h>
to the top of lkstat.c and modify the two occurances of the statement 
mode[rsb->rsb$b_cgmode]
in routine rsb_disp() to read
rsb->rsb$b_mode > LCK$K_EXMODE ? "??" : mode[rsb->rsb$b_cgmode]

Regards,
	Gary Nebbett (/pn=gary.nebbett/ou=chcgbs30/@ciba-geigy.ch)

