Added error checking on bitbus message queue calls

This commit is contained in:
John Winans
1994-06-10 09:04:01 +00:00
parent ec14c35f2d
commit da93c276a4

View File

@@ -1988,7 +1988,11 @@ int time;
{
bbdpvt.rxMaxLen = length > BB_MAX_DAT_LEN ? BB_MAX_DAT_LEN+7 : length+7;
bbdpvt.ageLimit = 0;
(*(drvBitBus.qReq))(&bbdpvt, BB_Q_LOW);
if ((*(drvBitBus.qReq))(&bbdpvt, BB_Q_LOW) != OK)
{
bbdpvt.status = BB_NONODE;
return(ERROR);
}
semTake(*(bbdpvt.psyncSem), WAIT_FOREVER); /* wait for response */
if (ibDebug || bbibDebug)
@@ -2076,7 +2080,11 @@ int time;
}
bbdpvt.ageLimit = 0;
(*(drvBitBus.qReq))(&bbdpvt, BB_Q_HIGH);
if ((*(drvBitBus.qReq))(&bbdpvt, BB_Q_HIGH) != OK)
{
bbdpvt.status = BB_NONODE;
return(ERROR);
}
semTake(*(bbdpvt.psyncSem), WAIT_FOREVER); /* wait for response */
if (ibDebug || bbibDebug)
@@ -2126,7 +2134,11 @@ int length;
{
bbdpvt.txMsg.length = BB_MAX_DAT_LEN+7; /* send a chunk */
bbdpvt.ageLimit = 0;
(*(drvBitBus.qReq))(&bbdpvt, BB_Q_HIGH);
if ((*(drvBitBus.qReq))(&bbdpvt, BB_Q_HIGH) != OK)
{
bbdpvt.status = BB_NONODE;
return(ERROR);
}
semTake(*(bbdpvt.psyncSem), WAIT_FOREVER); /* wait for response */
length -= BB_MAX_DAT_LEN; /* ready for next chunk */
@@ -2136,7 +2148,11 @@ int length;
{
bbdpvt.txMsg.length = length+7; /* send the last chunk */
bbdpvt.ageLimit = 0;
(*(drvBitBus.qReq))(&bbdpvt, BB_Q_HIGH);
if ((*(drvBitBus.qReq))(&bbdpvt, BB_Q_HIGH) != OK)
{
bbdpvt.status = BB_NONODE;
return(ERROR);
}
semTake(*(bbdpvt.psyncSem), WAIT_FOREVER); /* wait for response */
/* BUG -- check bitbus response */
}
@@ -2257,7 +2273,11 @@ bbGpibIoctl(int link, int bug, int cmd, int v, caddr_t p)
bbDpvt.ageLimit = 0;
/* send it to the bug */
(*(drvBitBus.qReq))(&bbDpvt, BB_Q_HIGH);
if ((*(drvBitBus.qReq))(&bbDpvt, BB_Q_HIGH) != OK)
{
bbDpvt.status = BB_NONODE;
return(ERROR);
}
semTake(*(bbDpvt.psyncSem), WAIT_FOREVER); /* wait for finish */
if ((bbDpvt.status == BB_OK) && (!(bbDpvt.rxMsg.cmd & BB_IBSTAT_TMO)))
stat = OK;
@@ -2286,7 +2306,11 @@ bbGpibIoctl(int link, int bug, int cmd, int v, caddr_t p)
bbDpvt.ageLimit = 0;
/* send it to the bug */
(*(drvBitBus.qReq))(&bbDpvt, BB_Q_HIGH);
if ((*(drvBitBus.qReq))(&bbDpvt, BB_Q_HIGH) != OK)
{
bbDpvt.status = BB_NONODE;
return(ERROR);
}
semTake(*(bbDpvt.psyncSem), WAIT_FOREVER); /* wait for finish */
if ((bbDpvt.status == BB_OK) && (!(bbDpvt.rxMsg.cmd & BB_IBSTAT_TMO)))
stat = OK;