Merge commit 'refs/merge-requests/1' of ssh://gitorious.psi.ch/sinqdev/sics into merge-requests/1
First merge with ANSTO which compiles Conflicts: SICSmain.c asynnet.c confvirtualmot.c counter.c devexec.c drive.c exebuf.c hipadaba.c interface.h make_gen motor.c nserver.c nwatch.c ofac.c protocol.c sicshipadaba.c
This commit is contained in:
16
hipadaba.c
16
hipadaba.c
@@ -138,6 +138,9 @@ void DeleteNodeData(pHdb node)
|
||||
if (node->name != NULL) {
|
||||
free(node->name);
|
||||
}
|
||||
if (node->path != NULL) {
|
||||
free(node->path);
|
||||
}
|
||||
ReleaseHdbValue(&node->value);
|
||||
node->magic = 000000;
|
||||
|
||||
@@ -601,7 +604,7 @@ int compareHdbValue(hdbValue v1, hdbValue v2)
|
||||
}
|
||||
break;
|
||||
case HIPFLOAT:
|
||||
if (ABS(v1.v.doubleValue - v2.v.doubleValue) < .01) {
|
||||
if (ABS(v1.v.doubleValue - v2.v.doubleValue) < .0001) { /* DFC */
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -895,6 +898,7 @@ char *GetHipadabaPath(pHdb node)
|
||||
strcat(pPtr, "/");
|
||||
strcat(pPtr, nodeStack[i]->name);
|
||||
}
|
||||
node->path = pPtr;
|
||||
return pPtr;
|
||||
}
|
||||
|
||||
@@ -1167,6 +1171,16 @@ void SetHdbProperty(pHdb node, char *key, char *value)
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int HasHdbProperty(pHdb node, char *key)
|
||||
{
|
||||
if (node != NULL && node->properties != NULL) {
|
||||
return StringDictExists(node->properties, key);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int GetHdbProperty(pHdb node, char *key, char *value, int len)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user