'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);
|
||||
return 0;
|
||||
}
|
||||
EVUnregister(FindEMON(pServ->pSics),name);
|
||||
iRet = RemoveCommand(pServ->pSics,name);
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: %s not found, NOT deleted",name);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
if (!FindCommandData(pServ->pSics, name, "Environment Controller")) {
|
||||
SCPrintf(pCon,eError,"ERROR: no environment controller %s found",name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
EVUnregister(FindEMON(pServ->pSics),name);
|
||||
RemoveCommand(pServ->pSics,name);
|
||||
return 1;
|
||||
}
|
||||
/*-------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user