diff --git a/config/stack_config.h b/config/stack_config.h index e3b0b2d0..05e2c725 100644 --- a/config/stack_config.h +++ b/config/stack_config.h @@ -18,8 +18,8 @@ #define DEBUG_ISO_SERVER 0 #define DEBUG_ISO_CLIENT 0 #define DEBUG_IED_SERVER 0 -#define DEBUG_IED_CLIENT 1 -#define DEBUG_MMS_CLIENT 1 +#define DEBUG_IED_CLIENT 0 +#define DEBUG_MMS_CLIENT 0 #define DEBUG_MMS_SERVER 0 #define DEBUG_GOOSE_SUBSCRIBER 0 #define DEBUG_GOOSE_PUBLISHER 0 @@ -34,7 +34,7 @@ * 0 ==> server runs in multi-threaded mode (one thread for each connection and * one server background thread ) */ -#define CONFIG_MMS_SINGLE_THREADED 1 +#define CONFIG_MMS_SINGLE_THREADED 0 /* * Optimize stack for threadless operation - don't use semaphores diff --git a/src/iec61850/client/client_report.c b/src/iec61850/client/client_report.c index 55f04c5a..ad07eb4f 100644 --- a/src/iec61850/client/client_report.c +++ b/src/iec61850/client/client_report.c @@ -550,13 +550,13 @@ private_IedConnection_handleReport(IedConnection self, MmsValue* value) } } - printf("U0 sem wait\n"); Semaphore_wait(self->reportHandlerMutex); - printf("U1 call user\n"); + if (matchingReport->callback != NULL) matchingReport->callback(matchingReport->callbackParameter, matchingReport); + Semaphore_post(self->reportHandlerMutex); - printf("U2\n"); + exit_function: return; } diff --git a/src/iec61850/server/mms_mapping/mms_mapping.c b/src/iec61850/server/mms_mapping/mms_mapping.c index 78fb5dea..efaa0a18 100644 --- a/src/iec61850/server/mms_mapping/mms_mapping.c +++ b/src/iec61850/server/mms_mapping/mms_mapping.c @@ -1893,7 +1893,7 @@ mmsWriteHandler(void* parameter, MmsDomain* domain, return DATA_ACCESS_ERROR_SUCCESS; } else - return DATA_ACCESS_ERROR_OBJECT_VALUE_INVALID; + return DATA_ACCESS_ERROR_OBJECT_NONE_EXISTENT; } return DATA_ACCESS_ERROR_OBJECT_ACCESS_DENIED; diff --git a/src/iec61850/server/model/model.c b/src/iec61850/server/model/model.c index 6e752faa..3a5a858d 100644 --- a/src/iec61850/server/model/model.c +++ b/src/iec61850/server/model/model.c @@ -408,7 +408,7 @@ LogicalDevice_getChildByMmsVariableName(LogicalDevice* logicalDevice, const char char fcString[3]; char nameRef[65]; - char* separator = strchr(mmsVariableName,'$'); + const char* separator = strchr(mmsVariableName,'$'); if (separator == NULL) return NULL; diff --git a/src/vs/libiec61850-wo-goose.def b/src/vs/libiec61850-wo-goose.def index 54cabdeb..f43450a4 100644 --- a/src/vs/libiec61850-wo-goose.def +++ b/src/vs/libiec61850-wo-goose.def @@ -486,11 +486,10 @@ EXPORTS MmsValue_getUtcTimeBuffer Timestamp_clearFlags IedServer_setGooseInterfaceId - MmsServerIdentity_destroy ClientReport_getBufOvfl MmsValue_getUtcTimeInMsWithUs IedModel_setIedNameForDynamicModel ControlObjectClient_useConstantT ControlObjectClient_setOrigin LogicalDevice_getChildByMmsVariableName - LogicalNode_getDataset + LogicalNode_getDataSet diff --git a/src/vs/libiec61850.def b/src/vs/libiec61850.def index 73d532e7..52d5ba48 100644 --- a/src/vs/libiec61850.def +++ b/src/vs/libiec61850.def @@ -435,7 +435,7 @@ EXPORTS ReportControlBlock_create IedConnection_readBooleanValue IedConnection_readFloatValue - IedConnection_readStringValue + IedConnection_readStringValue IedConnection_readInt32Value IedConnection_readUnsigned32Value IedConnection_readTimestampValue @@ -475,8 +475,8 @@ EXPORTS SettingGroupControlBlock_create MmsConnection_setConnectTimeout IedConnection_setConnectTimeout - MmsValue_newVisibleStringWithSize - MmsValue_newMmsStringWithSize + MmsValue_newVisibleStringWithSize + MmsValue_newMmsStringWithSize MmsValue_setInt8 MmsValue_setInt16 LogicalDevice_getSettingGroupControlBlock @@ -510,11 +510,10 @@ EXPORTS MmsValue_getUtcTimeBuffer Timestamp_clearFlags IedServer_setGooseInterfaceId - MmsServerIdentity_destroy ClientReport_getBufOvfl MmsValue_getUtcTimeInMsWithUs IedModel_setIedNameForDynamicModel ControlObjectClient_useConstantT ControlObjectClient_setOrigin LogicalDevice_getChildByMmsVariableName - LogicalNode_getDataset + LogicalNode_getDataSet