- MMS server: MMS read handler sets domain to NULL for VMD scope variable

This commit is contained in:
Michael Zillgith 2017-09-27 15:30:23 +02:00
parent c3043290ac
commit 5b470f740c
3 changed files with 6 additions and 5 deletions

View file

@ -882,7 +882,7 @@ Logging_processIntegrityLogs(MmsMapping* self, uint64_t currentTimeInMs)
if (currentTimeInMs >= logControl->nextIntegrityScan) {
//if (DEBUG_IED_SERVER)
if (DEBUG_IED_SERVER)
printf("IED_SERVER: INTEGRITY SCAN for log %s\n", logControl->name);
LogControl_logAllDatasetEntries(logControl, self->mmsDevice->deviceName);

View file

@ -306,13 +306,13 @@ LinkedList /* <char*> */
MmsConnection_getDomainVariableNames(MmsConnection self, MmsError* mmsError, const char* domainId);
/**
* \brief Get the names of all named variable lists present in a MMS domain of the server.
* \brief Get the names of all named variable lists present in a MMS domain or VMD scope of the server.
*
* This will result in a domain specific GetNameList request.
*
* \param self MmsConnection instance to operate on
* \param mmsError user provided variable to store error code
* \param domainId the domain name for the domain specific request
* \param domainId the domain name for the domain specific request or NULL for a VMD scope request
*
* \return the domain specific named variable list names or NULL if the request failed.
*/

View file

@ -299,7 +299,8 @@ mmsServer_getValue(MmsServer self, MmsDomain* domain, char* itemId, MmsServerCon
if (self->readAccessHandler != NULL) {
MmsDataAccessError accessError =
self->readAccessHandler(self->readAccessHandlerParameter, domain, itemId, connection);
self->readAccessHandler(self->readAccessHandlerParameter, (domain == (MmsDomain*) self->device) ? NULL : domain,
itemId, connection);
if (accessError != DATA_ACCESS_ERROR_SUCCESS) {
value = MmsValue_newDataAccessError(accessError);
@ -312,7 +313,7 @@ mmsServer_getValue(MmsServer self, MmsDomain* domain, char* itemId, MmsServerCon
if (value == NULL)
if (self->readHandler != NULL)
value = self->readHandler(self->readHandlerParameter, domain,
value = self->readHandler(self->readHandlerParameter, (domain == (MmsDomain*) self->device) ? NULL : domain,
itemId, connection);
exit_function: