- Removed defunct capture command
- Moved some protocolls from sicspsi to kernel as discussed at ANSTO
This commit is contained in:
41
macro.c
41
macro.c
@@ -1095,44 +1095,3 @@ int TransactAction(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
SCWrite(pCon, "TRANSACTIONFINISHED", eLog);
|
||||
return iRet;
|
||||
}
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
int CaptureAction(SConnection *pCon, SicsInterp * pSics, void *pData,
|
||||
int argc, char *argv[])
|
||||
{
|
||||
SConnection *comCon = NULL;
|
||||
char buffer[1024];
|
||||
char *command;
|
||||
int status;
|
||||
pDynString reply = NULL;
|
||||
|
||||
if (argc < 2) {
|
||||
SCWrite(pCon, "ERROR: insufficient arguments to capture", eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
comCon = SCCopyConnection(pCon);
|
||||
if (comCon == NULL) {
|
||||
SCWrite(pCon, "ERROR: out of memory in capture", eError);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* This line is required to support nested captures
|
||||
*/
|
||||
comCon->data = NULL;
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
command = Arg2Tcl(argc - 1, &argv[1], buffer, sizeof buffer);
|
||||
if (!command) {
|
||||
SCWrite(pCon, "ERROR: no more memory", eError);
|
||||
return 0;
|
||||
}
|
||||
SCStartBuffering(comCon);
|
||||
status = InterpExecute(pSics, comCon, command);
|
||||
if (command != buffer)
|
||||
free(command);
|
||||
reply = SCEndBuffering(comCon);
|
||||
SCWrite(pCon,GetCharArray(reply), eValue);
|
||||
SCDeleteConnection(comCon);
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user