|
|
|
@ -331,25 +331,23 @@ static void
|
|
|
|
|
addNamedVariableToResultList(MmsVariableSpecification* namedVariable, MmsDomain* domain, char* nameIdStr,
|
|
|
|
|
LinkedList /*<MmsValue>*/ values, MmsServerConnection connection, AlternateAccess_t* alternateAccess, bool isAccessToSingleVariable)
|
|
|
|
|
{
|
|
|
|
|
if (namedVariable != NULL) {
|
|
|
|
|
if (namedVariable) {
|
|
|
|
|
|
|
|
|
|
if (DEBUG_MMS_SERVER)
|
|
|
|
|
printf("MMS read: found named variable %s with search string %s\n",
|
|
|
|
|
namedVariable->name, nameIdStr);
|
|
|
|
|
|
|
|
|
|
if (namedVariable->type == MMS_STRUCTURE) {
|
|
|
|
|
|
|
|
|
|
MmsValue* value = mmsServer_getValue(connection->server, domain, nameIdStr, connection, isAccessToSingleVariable);
|
|
|
|
|
|
|
|
|
|
if (alternateAccess != NULL) {
|
|
|
|
|
|
|
|
|
|
if (namedVariable->type == MMS_STRUCTURE)
|
|
|
|
|
{
|
|
|
|
|
if (alternateAccess)
|
|
|
|
|
{
|
|
|
|
|
char variableName[200];
|
|
|
|
|
variableName[0] = 0;
|
|
|
|
|
strcat(variableName, nameIdStr);
|
|
|
|
|
|
|
|
|
|
value = getComponent(connection, domain, alternateAccess, namedVariable, variableName);
|
|
|
|
|
MmsValue* value = getComponent(connection, domain, alternateAccess, namedVariable, variableName);
|
|
|
|
|
|
|
|
|
|
if (value != NULL) {
|
|
|
|
|
if (value) {
|
|
|
|
|
appendValueToResultList(value, values);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
@ -357,7 +355,9 @@ addNamedVariableToResultList(MmsVariableSpecification* namedVariable, MmsDomain*
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (value != NULL) {
|
|
|
|
|
MmsValue* value = mmsServer_getValue(connection->server, domain, nameIdStr, connection, isAccessToSingleVariable);
|
|
|
|
|
|
|
|
|
|
if (value) {
|
|
|
|
|
appendValueToResultList(value, values);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
@ -368,7 +368,7 @@ addNamedVariableToResultList(MmsVariableSpecification* namedVariable, MmsDomain*
|
|
|
|
|
}
|
|
|
|
|
else if (namedVariable->type == MMS_ARRAY) {
|
|
|
|
|
|
|
|
|
|
if (alternateAccess != NULL) {
|
|
|
|
|
if (alternateAccess) {
|
|
|
|
|
alternateArrayAccess(connection, alternateAccess, domain,
|
|
|
|
|
nameIdStr, values, namedVariable);
|
|
|
|
|
}
|
|
|
|
@ -379,7 +379,7 @@ addNamedVariableToResultList(MmsVariableSpecification* namedVariable, MmsDomain*
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
if (alternateAccess != NULL) {
|
|
|
|
|
if (alternateAccess) {
|
|
|
|
|
appendErrorToResultList(values, DATA_ACCESS_ERROR_OBJECT_NONE_EXISTENT);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
@ -761,7 +761,6 @@ static void
|
|
|
|
|
createNamedVariableListResponse(MmsServerConnection connection, MmsNamedVariableList namedList,
|
|
|
|
|
int invokeId, ByteBuffer* response, bool isSpecWithResult, VarAccessSpec* accessSpec)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
LinkedList /*<MmsValue>*/ values = LinkedList_create();
|
|
|
|
|
LinkedList variables = MmsNamedVariableList_getVariableList(namedList);
|
|
|
|
|
|
|
|
|
|