|
|
@ -681,7 +681,8 @@ createGetNamedVariableListAttributesResponse(int invokeId, ByteBuffer* response,
|
|
|
|
LinkedList variable = LinkedList_getNext(variables);
|
|
|
|
LinkedList variable = LinkedList_getNext(variables);
|
|
|
|
|
|
|
|
|
|
|
|
int i;
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < variableCount; i++) {
|
|
|
|
for (i = 0; i < variableCount; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
MmsNamedVariableListEntry variableEntry = (MmsNamedVariableListEntry) variable->data;
|
|
|
|
MmsNamedVariableListEntry variableEntry = (MmsNamedVariableListEntry) variable->data;
|
|
|
|
|
|
|
|
|
|
|
|
varListResponse->listOfVariable.list.array[i] = (struct GetNamedVariableListAttributesResponse__listOfVariable__Member*)
|
|
|
|
varListResponse->listOfVariable.list.array[i] = (struct GetNamedVariableListAttributesResponse__listOfVariable__Member*)
|
|
|
@ -746,8 +747,8 @@ mmsServer_handleGetNamedVariableListAttributesRequest(
|
|
|
|
goto exit_function;
|
|
|
|
goto exit_function;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (request->present == ObjectName_PR_domainspecific) {
|
|
|
|
if (request->present == ObjectName_PR_domainspecific)
|
|
|
|
|
|
|
|
{
|
|
|
|
char domainName[65];
|
|
|
|
char domainName[65];
|
|
|
|
char itemName[65];
|
|
|
|
char itemName[65];
|
|
|
|
|
|
|
|
|
|
|
@ -767,14 +768,15 @@ mmsServer_handleGetNamedVariableListAttributesRequest(
|
|
|
|
|
|
|
|
|
|
|
|
MmsDomain* domain = MmsDevice_getDomain(mmsDevice, domainName);
|
|
|
|
MmsDomain* domain = MmsDevice_getDomain(mmsDevice, domainName);
|
|
|
|
|
|
|
|
|
|
|
|
if (domain != NULL) {
|
|
|
|
if (domain != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
MmsNamedVariableList variableList =
|
|
|
|
MmsNamedVariableList variableList =
|
|
|
|
MmsDomain_getNamedVariableList(domain, itemName);
|
|
|
|
MmsDomain_getNamedVariableList(domain, itemName);
|
|
|
|
|
|
|
|
|
|
|
|
if (variableList != NULL) {
|
|
|
|
if (variableList != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (createGetNamedVariableListAttributesResponse(invokeId, response, variableList) == false) {
|
|
|
|
if (createGetNamedVariableListAttributesResponse(invokeId, response, variableList) == false)
|
|
|
|
|
|
|
|
{
|
|
|
|
/* encoding failed - probably because buffer size is too small for message */
|
|
|
|
/* encoding failed - probably because buffer size is too small for message */
|
|
|
|
ByteBuffer_setSize(response, 0);
|
|
|
|
ByteBuffer_setSize(response, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -789,8 +791,8 @@ mmsServer_handleGetNamedVariableListAttributesRequest(
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#if (MMS_DYNAMIC_DATA_SETS == 1)
|
|
|
|
#if (MMS_DYNAMIC_DATA_SETS == 1)
|
|
|
|
else if (request->present == ObjectName_PR_aaspecific) {
|
|
|
|
else if (request->present == ObjectName_PR_aaspecific)
|
|
|
|
|
|
|
|
{
|
|
|
|
char listName[65];
|
|
|
|
char listName[65];
|
|
|
|
|
|
|
|
|
|
|
|
if (request->choice.aaspecific.size > 64) {
|
|
|
|
if (request->choice.aaspecific.size > 64) {
|
|
|
@ -809,7 +811,8 @@ mmsServer_handleGetNamedVariableListAttributesRequest(
|
|
|
|
mmsMsg_createServiceErrorPdu(invokeId, response, MMS_ERROR_ACCESS_OBJECT_NON_EXISTENT);
|
|
|
|
mmsMsg_createServiceErrorPdu(invokeId, response, MMS_ERROR_ACCESS_OBJECT_NON_EXISTENT);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif /* (MMS_DYNAMIC_DATA_SETS == 1) */
|
|
|
|
#endif /* (MMS_DYNAMIC_DATA_SETS == 1) */
|
|
|
|
else if (request->present == ObjectName_PR_vmdspecific) {
|
|
|
|
else if (request->present == ObjectName_PR_vmdspecific)
|
|
|
|
|
|
|
|
{
|
|
|
|
char listName[65];
|
|
|
|
char listName[65];
|
|
|
|
|
|
|
|
|
|
|
|
if (request->choice.vmdspecific.size > 64) {
|
|
|
|
if (request->choice.vmdspecific.size > 64) {
|
|
|
@ -833,6 +836,13 @@ mmsServer_handleGetNamedVariableListAttributesRequest(
|
|
|
|
mmsMsg_createServiceErrorPdu(invokeId, response, MMS_ERROR_ACCESS_OBJECT_ACCESS_UNSUPPORTED);
|
|
|
|
mmsMsg_createServiceErrorPdu(invokeId, response, MMS_ERROR_ACCESS_OBJECT_ACCESS_UNSUPPORTED);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ByteBuffer_getSize(response) > connection->maxPduSize)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ByteBuffer_setSize(response, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mmsMsg_createServiceErrorPdu(invokeId, response, MMS_ERROR_RESOURCE_OTHER);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
exit_function:
|
|
|
|
exit_function:
|
|
|
|
|
|
|
|
|
|
|
|
asn_DEF_GetVariableAccessAttributesRequest.free_struct(&asn_DEF_GetNamedVariableListAttributesRequest,
|
|
|
|
asn_DEF_GetVariableAccessAttributesRequest.free_struct(&asn_DEF_GetNamedVariableListAttributesRequest,
|
|
|
|