- Fixed an off by one in a message from killfile
- Fixed a nasty reentrency bug in nread.c _ protected devexec.c against the same bug
This commit is contained in:
2
danu.c
2
danu.c
@ -364,7 +364,7 @@ int NewThousand(pDataNumber self)
|
||||
if(SCMatchRights(pCon,usMugger))
|
||||
{
|
||||
iNum = DecrementDataNumber(self);
|
||||
snprintf(pBueffel,511,"Data file %d killed", iNum);
|
||||
snprintf(pBueffel,511,"Data file %d killed", iNum+1);
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
return 1;
|
||||
}
|
||||
|
17
devexec.c
17
devexec.c
@ -170,6 +170,7 @@ typedef struct {
|
||||
pICallBack pCall;
|
||||
time_t lastRun;
|
||||
int paused;
|
||||
int taskRunning;
|
||||
} ExeList;
|
||||
|
||||
static pExeList pExecutor = NULL;
|
||||
@ -1364,8 +1365,20 @@ static int testFinish(pExeList self){
|
||||
return 0;
|
||||
}
|
||||
|
||||
self->lastRun = time(NULL);
|
||||
if(self->taskRunning == 1){
|
||||
printf("DevexecTask reentrant protection triggered\n");
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
* CheckExeList may cause waits and thus reentrant calls to
|
||||
* this. Which can cause trouble
|
||||
*/
|
||||
self->taskRunning = 1;
|
||||
iRet = CheckExeList(self);
|
||||
self->taskRunning = 0;
|
||||
|
||||
|
||||
self->lastRun = time(NULL);
|
||||
switch(iRet)
|
||||
{
|
||||
case -1: /* some problem */
|
||||
@ -1374,7 +1387,9 @@ static int testFinish(pExeList self){
|
||||
{
|
||||
if(iInterrupt > 1)
|
||||
{
|
||||
self->taskRunning = 1;
|
||||
StopExe(self,"all");
|
||||
self->taskRunning = 0;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
printf("DevExecTask found an error\n");
|
||||
|
2
nread.c
2
nread.c
@ -265,7 +265,7 @@ extern int VerifyChannel(mkChannel *self); /* defined in network.c */
|
||||
"ERROR: insufficient privilege to invoke Interrupt",
|
||||
eError);
|
||||
}
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* split into command lines
|
||||
|
Reference in New Issue
Block a user