- Fixed a sget bug which caused text wrongly to be identified as numbers

- Fixed a sput bug: SetHipadabaPar versus UpdateHipadabaPar
- Modified hdelcb to be able to remove callbacks from SICS objects
This commit is contained in:
2014-11-18 09:24:27 +01:00
parent fd986402ff
commit f274f3bcdb
5 changed files with 42 additions and 12 deletions

View File

@@ -289,9 +289,8 @@ hdbCallbackReturn SICSValueCheckCallback(pHdb node, void *userData,
}
return hdbAbort;
}
/*-------------------------------------------------------------------------------------*/
static hdbCallbackReturn SICSDriveCallback(pHdb node, void *userData,
pHdbMessage message)
@@ -3131,6 +3130,7 @@ static int RemoveHdbCallback(SConnection * pCon, SicsInterp * pSics,
{
int id;
hdbIDMessage m;
pObjectDescriptor pObj = NULL;
if (argc < 2) {
SCWrite(pCon, "ERROR: need callback id to remove", eError);
@@ -3139,7 +3139,14 @@ static int RemoveHdbCallback(SConnection * pCon, SicsInterp * pSics,
id = atoi(argv[1]);
m.type = killID;
m.ID = id;
RecurseCallbackChains(root, (pHdbMessage) & m);
if(argc < 3){
RecurseCallbackChains(root, (pHdbMessage) & m);
} else {
pObj = FindCommandDescriptor(pSics,argv[2]);
if(pObj != NULL && pObj->parNode != NULL){
RecurseCallbackChains(pObj->parNode,(pHdbMessage)&m);
}
}
SCSendOK(pCon);
return 1;
}