PSI sics-cvs-psi-2006

This commit is contained in:
2006-05-08 02:00:00 +00:00
committed by Douglas Clowes
parent ae77364de2
commit 6e926b813f
388 changed files with 445529 additions and 14109 deletions

View File

@@ -83,8 +83,8 @@
{
pCron pNew = NULL;
int iVal, iRet;
char pBueffel[512];
char *cmd;
/* only managers may do this */
if(!SCMatchRights(pCon,usMugger))
{
@@ -108,11 +108,11 @@
}
/* concatenate the rest to the command */
Arg2Text(argc-2,&argv[2],pBueffel,511);
cmd = Arg2Tcl(argc-2,&argv[2],NULL,0);
/* create data structure and install task */
pNew = (pCron)malloc(sizeof(Cron));
if(!pNew)
if(!pNew || !cmd)
{
SCWrite(pCon,"ERROR: out of memory in sicscron",eError);
return 0;
@@ -124,7 +124,7 @@
return 0;
}
pNew->iIntervall = iVal;
pNew->pCommand = strdup(pBueffel);
pNew->pCommand = cmd;
pNew->tNext = 0;
pNew->iEnd = 1;
@@ -137,3 +137,6 @@
SCSendOK(pCon);
return 1;
}