- design improvements in scriptcontext (sct send) and ascon (AsconBaseHandler)
- bug fixes
This commit is contained in:
@ -12,13 +12,39 @@
|
||||
|
||||
#define MAX_HDB_PATH 1024
|
||||
/*-------------------------------------------------------------------------*/
|
||||
static pDynString ComposeSicsCommand(pHdb node)
|
||||
{
|
||||
char *sicsdev;
|
||||
pDynString sicsCommand;
|
||||
|
||||
if (node == NULL)
|
||||
return NULL;
|
||||
sicsdev = GetHdbProp(node, "sicsdev");
|
||||
if (sicsdev != NULL) {
|
||||
sicsCommand = CreateDynString(60,63);
|
||||
DynStringConcat(sicsCommand, sicsdev);
|
||||
return sicsCommand;
|
||||
}
|
||||
sicsCommand = ComposeSicsCommand(node->mama);
|
||||
if (sicsCommand) {
|
||||
if (strchr(GetCharArray(sicsCommand), ' ') == NULL) {
|
||||
DynStringConcatChar(sicsCommand, ' ');
|
||||
} else {
|
||||
DynStringConcatChar(sicsCommand, '/');
|
||||
}
|
||||
DynStringConcat(sicsCommand, node->name);
|
||||
}
|
||||
return sicsCommand;
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
static int MakePlainNode(pHdb parent, char *name, SConnection * pCon,
|
||||
int argc, char *argv[])
|
||||
{
|
||||
pHdb child = NULL;
|
||||
int type = 0, length = 0, priv = -1;
|
||||
hdbValue val;
|
||||
|
||||
pDynString sicsCommand = NULL;
|
||||
|
||||
if (argc < 5) {
|
||||
SCWrite(pCon, "ERROR: not enough arguments to create plain node",
|
||||
eError);
|
||||
@ -68,6 +94,13 @@ static int MakePlainNode(pHdb parent, char *name, SConnection * pCon,
|
||||
}
|
||||
|
||||
AddHipadabaChild(parent, child, pCon);
|
||||
if (type != HIPNONE) {
|
||||
sicsCommand = ComposeSicsCommand(child);
|
||||
if (sicsCommand) {
|
||||
SetHdbProperty(child, "sicscommand", GetCharArray(sicsCommand));
|
||||
DeleteDynString(sicsCommand);
|
||||
}
|
||||
}
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user