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:
8
nread.c
8
nread.c
@@ -1067,10 +1067,10 @@ static int CommandDataCB(int handle, void *userData)
|
||||
if (pPtr[i] == '\r' || pPtr[i] == '\n') {
|
||||
self->state = SKIPTERM;
|
||||
if (!testAndInvokeInterrupt(self, handle)) {
|
||||
if (self->pCon->iProtocolID == PROTSICS && CostaLocked(self->pCon->pStack))
|
||||
if (SCGetProtocolID(self->pCon) == PROTSICS && SCCostaLocked(self->pCon))
|
||||
status = 0;
|
||||
else
|
||||
status = CostaTop(self->pCon->pStack, GetCharArray(self->command));
|
||||
status = SCCostaTop(self->pCon, GetCharArray(self->command));
|
||||
if (!status) {
|
||||
SCWrite(self->pCon, "ERROR: Busy", eError);
|
||||
}
|
||||
@@ -1171,10 +1171,10 @@ static int ANETTelnetProcess(int handle, void *usData)
|
||||
case '\r':
|
||||
case '\n':
|
||||
if (!testAndInvokeInterrupt(self, handle)) {
|
||||
if (self->pCon->iProtocolID == PROTSICS && CostaLocked(self->pCon->pStack))
|
||||
if (SCGetProtocolID(self->pCon) == PROTSICS && SCCostaLocked(self->pCon))
|
||||
status = 0;
|
||||
else
|
||||
status = CostaTop(self->pCon->pStack, GetCharArray(self->command));
|
||||
status = SCCostaTop(self->pCon, GetCharArray(self->command));
|
||||
if (!status) {
|
||||
SCWrite(self->pCon, "ERROR: Busy", eError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user