'evfactory del' should not delete other objects than environment controllers
This commit is contained in:
@ -1412,14 +1412,13 @@ int RemoveEVController(SConnection *pCon, char *name) {
|
|||||||
SCWrite(pCon,"ERROR: cannot delete while running",eError);
|
SCWrite(pCon,"ERROR: cannot delete while running",eError);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EVUnregister(FindEMON(pServ->pSics),name);
|
if (!FindCommandData(pServ->pSics, name, "Environment Controller")) {
|
||||||
iRet = RemoveCommand(pServ->pSics,name);
|
SCPrintf(pCon,eError,"ERROR: no environment controller %s found",name);
|
||||||
if(!iRet)
|
|
||||||
{
|
|
||||||
sprintf(pBueffel,"ERROR: %s not found, NOT deleted",name);
|
|
||||||
SCWrite(pCon,pBueffel,eError);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EVUnregister(FindEMON(pServ->pSics),name);
|
||||||
|
RemoveCommand(pServ->pSics,name);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user