- Introduced a new trace facility
- Fixed performance problems in many protocol drivers. SKIPPED: psi/julprot.c psi/phytron.c psi/pmacprot.c psi/polterwrite.c psi/spss7.c
This commit is contained in:
6
nread.c
6
nread.c
@@ -41,6 +41,7 @@
|
||||
#include "nread.h"
|
||||
#include "commandlog.h"
|
||||
#include "uselect.h"
|
||||
#include "trace.h"
|
||||
|
||||
extern pServer pServ;
|
||||
extern int VerifyChannel(mkChannel * self); /* defined in network.c */
|
||||
@@ -62,6 +63,7 @@ typedef enum {
|
||||
tSE
|
||||
} TelnetStatus;
|
||||
|
||||
extern char *ConID(SConnection *pCon); /* from conman.c */
|
||||
/*--------------------------------------------------------------------------*/
|
||||
typedef struct __netreader {
|
||||
pServer pMain; /* The server ds */
|
||||
@@ -260,6 +262,7 @@ static int NetReadRead(pNetRead self, pNetItem pItem)
|
||||
if (pPtr) {
|
||||
sscanf(pPtr, "%s %d", pMuell, &iInt);
|
||||
if (SCMatchRights(pItem->pCon, usUser)) {
|
||||
traceCommand(ConID(pItem->pCon),"interrupt: %d",iInt);
|
||||
TaskSignal(self->pMain->pTasker, SICSINT, &iInt);
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "INTERRUPT %d issued on sock %d",
|
||||
iInt, pItem->pCon->pSock->sockid);
|
||||
@@ -451,6 +454,7 @@ static int TelnetRead(pNetRead self, pNetItem pItem)
|
||||
}
|
||||
}
|
||||
TaskSignal(self->pMain->pTasker, SICSINT, &iInt);
|
||||
traceCommand(ConID(pItem->pCon),"interrupt: %d",iInt);
|
||||
snprintf(pError,sizeof(pError)-1, "INTERRUPT %d issued on sock %d", iInt,
|
||||
pItem->pCon->pSock->sockid);
|
||||
WriteToCommandLog("SYS>", pError);
|
||||
@@ -1015,6 +1019,7 @@ static int testAndInvokeInterrupt(pCommandCBData self, int handle)
|
||||
if ((pInt = strstr(pPtr, "INT1712")) != NULL) {
|
||||
sscanf(pInt, "%s %d", buffer, &iInt);
|
||||
if (SCMatchRights(self->pCon, usUser)) {
|
||||
traceCommand(ConID(self->pCon),"interrupt:%d",iInt);
|
||||
TaskSignal(pServ->pTasker, SICSINT, &iInt);
|
||||
snprintf(buffer, 512, "INTERRUPT %d issued on sock %d",
|
||||
iInt, handle);
|
||||
@@ -1316,6 +1321,7 @@ static int TelnetAcceptCB(int handle, void *userData)
|
||||
/*------------------------------------------------------------------------------------*/
|
||||
static void NREADlog(int level, char *txt, void *userData)
|
||||
{
|
||||
traceSys("anet",txt);
|
||||
puts(txt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user