- Introducted Arg2Tcl as a replacement for some calls to Arg2Text

- Fixed a memory leak
This commit is contained in:
zolliker
2006-04-11 07:26:55 +00:00
parent e25fb68080
commit da3dfd9d76
11 changed files with 184 additions and 92 deletions

View File

@ -1214,12 +1214,11 @@ static void ErrReport(pEVControl self)
strtolower(argv[1]);
if(strcmp(argv[1],"errorscript") == 0)
{
Arg2Text(argc-2,&argv[2],pBueffel,255);
if(self->errorScript != NULL)
{
free(self->errorScript);
}
self->errorScript = strdup(pBueffel);
self->errorScript = Arg2Tcl(argc-2,&argv[2],NULL,0);
SCSendOK(pCon);
SCparChange(pCon);
return 1;
@ -1542,8 +1541,7 @@ int RemoveEVController(SConnection *pCon, char *name) {
return 0;
}
if (pNew->pDriv->SavePars) {
Arg2Text(argc-3, argv+3, pBueffel, sizeof pBueffel);
pNew->creationArgs = strdup(pBueffel);
pNew->creationArgs = Arg2Tcl(argc-3, argv+3, NULL, 0);
pNew->pDes->SaveStatus = EVSaveStatus;
} else {
pNew->creationArgs = NULL;