- fixed bug in mms_get_namelist_service.c when client sends wrong domain name

This commit is contained in:
Michael Zillgith 2015-10-09 15:19:42 +02:00
parent 6e260b88a4
commit 2120595792

View file

@ -436,9 +436,12 @@ mmsServer_handleGetNameListRequest(
else if (objectClass == OBJECT_CLASS_NAMED_VARIABLE_LIST) {
LinkedList nameList = getNamedVariableListsDomainSpecific(connection, domainSpecificName);
createNameListResponse(connection, invokeId, nameList, response, continueAfter);
LinkedList_destroy(nameList);
if (nameList == NULL)
mmsServer_createConfirmedErrorPdu(invokeId, response, MMS_ERROR_ACCESS_OBJECT_NON_EXISTENT);
else {
createNameListResponse(connection, invokeId, nameList, response, continueAfter);
LinkedList_destroy(nameList);
}
}
#endif /* (MMS_DATA_SET_SERVICE == 1) */
@ -447,7 +450,6 @@ mmsServer_handleGetNameListRequest(
mmsServer_createConfirmedErrorPdu(invokeId, response, MMS_ERROR_ACCESS_OBJECT_ACCESS_UNSUPPORTED);
}
}
else if (objectScope == OBJECT_SCOPE_VMD) { /* vmd-specific */