Added command stack wrappers and fixed up nread and removed dead code from nserver

Removed direct access from token.c
This commit is contained in:
2016-10-31 15:33:31 +01:00
parent 0e2605b570
commit 5f2abbb99a
5 changed files with 52 additions and 17 deletions

View File

@ -2437,4 +2437,43 @@ void SCSetProtocolID(SConnection *pCon, int id)
}
pCon->iProtocolID = id;
}
/*--------------------------------------------------------*/
void SCCostaLock(SConnection *pCon)
{
if (!VerifyConnection(pCon)) {
return;
}
CostaLock(pCon->pStack);
}
/*---------------------------------------------------------*/
void SCCostaUnLock(SConnection *pCon){
if (!VerifyConnection(pCon)) {
return;
}
CostaUnlock(pCon->pStack);
}
/*---------------------------------------------------------*/
int SCCostaLocked(SConnection *pCon)
{
if (!VerifyConnection(pCon)) {
return 0;
}
return CostaLocked(pCon->pStack);
}
/*----------------------------------------------------------*/
int SCCostaTop(SConnection *pCon, char *command)
{
if (!VerifyConnection(pCon)) {
return 0;
}
return CostaTop(pCon->pStack, command);
}
/*----------------------------------------------------------*/
void SCSetGrab(SConnection *pCon, int iGrab)
{
if (!VerifyConnection(pCon)) {
return;
}
pCon->iGrab = iGrab;
}