- 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:
koennecke
2007-09-06 13:25:51 +00:00
parent e4a55b9d0c
commit c75f556fa5
4 changed files with 28 additions and 1300 deletions

2
danu.c
View File

@ -364,7 +364,7 @@ int NewThousand(pDataNumber self)
if(SCMatchRights(pCon,usMugger)) if(SCMatchRights(pCon,usMugger))
{ {
iNum = DecrementDataNumber(self); iNum = DecrementDataNumber(self);
snprintf(pBueffel,511,"Data file %d killed", iNum); snprintf(pBueffel,511,"Data file %d killed", iNum+1);
SCWrite(pCon,pBueffel,eWarning); SCWrite(pCon,pBueffel,eWarning);
return 1; return 1;
} }

View File

@ -170,6 +170,7 @@ typedef struct {
pICallBack pCall; pICallBack pCall;
time_t lastRun; time_t lastRun;
int paused; int paused;
int taskRunning;
} ExeList; } ExeList;
static pExeList pExecutor = NULL; static pExeList pExecutor = NULL;
@ -1364,8 +1365,20 @@ static int testFinish(pExeList self){
return 0; 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); iRet = CheckExeList(self);
self->taskRunning = 0;
self->lastRun = time(NULL);
switch(iRet) switch(iRet)
{ {
case -1: /* some problem */ case -1: /* some problem */
@ -1374,7 +1387,9 @@ static int testFinish(pExeList self){
{ {
if(iInterrupt > 1) if(iInterrupt > 1)
{ {
self->taskRunning = 1;
StopExe(self,"all"); StopExe(self,"all");
self->taskRunning = 0;
} }
#ifdef DEBUG #ifdef DEBUG
printf("DevExecTask found an error\n"); printf("DevExecTask found an error\n");

View File

@ -265,7 +265,7 @@ extern int VerifyChannel(mkChannel *self); /* defined in network.c */
"ERROR: insufficient privilege to invoke Interrupt", "ERROR: insufficient privilege to invoke Interrupt",
eError); eError);
} }
return 1; return 0;
} }
/* split into command lines /* split into command lines
@ -703,7 +703,7 @@ extern int VerifyChannel(mkChannel *self); /* defined in network.c */
{ {
return 0; return 0;
} }
/* build the select mask */ /* build the select mask */
FD_ZERO(&lMask); FD_ZERO(&lMask);
iRet = LLDnodePtr2First(self->iList); iRet = LLDnodePtr2First(self->iList);

1305
val.lis

File diff suppressed because it is too large Load Diff