- Fixed conflicts in ascon.c

- Supressed superfluous message from fmess
- Expanded multicounter to deal with threshold commands nicely
- Fixed an an issue with an uninitialized dummy connection in nserver
- Many changes to simidex to make it work in a more reliable way.
- Added hdbfactory path alias targetpath
- Extended frame to deal with sinqhttp HM
This commit is contained in:
koennecke
2009-03-09 08:28:08 +00:00
parent de4ca7a5e9
commit 10a475f020
21 changed files with 469 additions and 102 deletions

36
macro.c
View File

@@ -1062,3 +1062,39 @@ 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, "EROOR: out of memory in capture", eError);
return 0;
}
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;
}