From 462e9c38512dff3e9172efd22bd41ee300ee0280 Mon Sep 17 00:00:00 2001 From: Maxson Ramon dos Anjos Medeiros Date: Wed, 3 Jul 2024 17:33:33 +0200 Subject: [PATCH] -added function to set the number of outstanding calls- IedConnection_setMaxOutstandingCalls (LIB61850-433) --- config/stack_config.h | 14 ++++++ config/stack_config.h.cmake | 14 ++++++ dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs | 45 ++++++++++++------- src/iec61850/client/ied_connection.c | 34 +++++++++++--- src/iec61850/inc/iec61850_client.h | 10 +++++ .../inc_private/ied_connection_private.h | 1 + src/mms/inc/mms_client_connection.h | 10 +++++ src/mms/inc_private/mms_client_internal.h | 2 + src/mms/inc_private/mms_common_internal.h | 2 - .../iso_mms/client/mms_client_connection.c | 36 +++++++++++---- src/mms/iso_mms/client/mms_client_initiate.c | 22 +++++---- .../iso_mms/server/mms_association_service.c | 12 ++--- 12 files changed, 153 insertions(+), 49 deletions(-) diff --git a/config/stack_config.h b/config/stack_config.h index bc3045d0..36d0b246 100644 --- a/config/stack_config.h +++ b/config/stack_config.h @@ -240,10 +240,24 @@ /* enable to configure MmsServer at runtime */ #define CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME 1 +/* Define the default number of the maximum outstanding calls allowed by the caller (client) */ +#define CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING 5 + +/* Define the default number of the maximum outstanding calls allowed by the calling endpoint (server) */ +#define CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED 5 + /************************************************************************************ * Check configuration for consistency - DO NOT MODIFY THIS PART! ************************************************************************************/ +#if (CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING < 1) +#error "Invalid configuration: CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING must be greater than 0!" +#endif + +#if (CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED < 1) +#error "Invalid configuration: CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED must be greater than 0!" +#endif + #if (MMS_JOURNAL_SERVICE != 1) #if (CONFIG_IEC61850_LOG_SERVICE == 1) diff --git a/config/stack_config.h.cmake b/config/stack_config.h.cmake index adfeca96..c61f6e26 100644 --- a/config/stack_config.h.cmake +++ b/config/stack_config.h.cmake @@ -229,10 +229,24 @@ /* enable to configure MmsServer at runtime */ #define CONFIG_MMS_SERVER_CONFIG_SERVICES_AT_RUNTIME 1 +/* Define the default number of the maximum outstanding calls allowed by the caller (client) */ +#define CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING 5 + +/* Define the default number of the maximum outstanding calls allowed by the calling endpoint (server) */ +#define CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED 5 + /************************************************************************************ * Check configuration for consistency - DO NOT MODIFY THIS PART! ************************************************************************************/ +#if (CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING < 1) +#error "Invalid configuration: CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING must be greater than 0!" +#endif + +#if (CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED < 1) +#error "Invalid configuration: CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED must be greater than 0!" +#endif + #if (MMS_JOURNAL_SERVICE != 1) #if (CONFIG_IEC61850_LOG_SERVICE == 1) diff --git a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs index a39a8a2f..38db124c 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ClientAPI.cs @@ -431,6 +431,9 @@ namespace IEC61850 [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern UInt32 IedConnection_getRequestTimeout(IntPtr self); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + static extern void IedConnection_setMaxOutstandingCalls(IntPtr self, int calling, int called); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern void IedConnection_setTimeQuality(IntPtr self, [MarshalAs(UnmanagedType.I1)] bool leapSecondKnown, [MarshalAs(UnmanagedType.I1)] bool clockFailure, [MarshalAs(UnmanagedType.I1)] bool clockNotSynchronized, int subsecondPrecision); @@ -557,11 +560,11 @@ namespace IEC61850 public delegate void StateChangedHandler(IedConnection connection, IedConnectionState newState); [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] - static extern void IedConnection_installStateChangedHandler(IntPtr connection, InternalStateChangedHandler handler, IntPtr parameter); - + static extern void IedConnection_installStateChangedHandler(IntPtr connection, InternalStateChangedHandler handler, IntPtr parameter); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] - static extern void IedServer_ignoreReadAccess(IntPtr self, [MarshalAs(UnmanagedType.I1)] bool ignore); - + static extern void IedServer_ignoreReadAccess(IntPtr self, [MarshalAs(UnmanagedType.I1)] bool ignore); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] static extern void IedServer_ignoreClientRequests(IntPtr self, [MarshalAs(UnmanagedType.I1)] bool ignore); @@ -821,6 +824,16 @@ namespace IEC61850 } } + /// + /// Set the maximum number outstanding calls allowed for this connection + /// + /// the maximum outstanding calls allowed by the caller (client) + /// the maximum outstanding calls allowed by the called endpoint (server) + public void SetMaxOutstandingCalls(int calling, int called) + { + IedConnection_setMaxOutstandingCalls(connection, calling, called); + } + /// /// Gets or sets the maximum size if a PDU (has to be set before calling connect!). /// @@ -1954,22 +1967,22 @@ namespace IEC61850 } } - /// - /// Ignore all MMS requests from clients (for testing purposes) - /// + /// + /// Ignore all MMS requests from clients (for testing purposes) + /// /// when true all requests from clients will be ignored - public void IgnoreClientRequests(bool ignore) - { - IedServer_ignoreClientRequests(connection, ignore); + public void IgnoreClientRequests(bool ignore) + { + IedServer_ignoreClientRequests(connection, ignore); } - /// - /// Temporarily ignore read requests (for testing purposes) - /// + /// + /// Temporarily ignore read requests (for testing purposes) + /// /// true to ignore read requests, false to handle read requests. - public void IgnoreReadAccess(bool ignore) - { - IedServer_ignoreReadAccess(connection, ignore); + public void IgnoreReadAccess(bool ignore) + { + IedServer_ignoreReadAccess(connection, ignore); } /// diff --git a/src/iec61850/client/ied_connection.c b/src/iec61850/client/ied_connection.c index 338df359..23ccf6ff 100644 --- a/src/iec61850/client/ied_connection.c +++ b/src/iec61850/client/ied_connection.c @@ -33,7 +33,6 @@ #define DEFAULT_CONNECTION_TIMEOUT 10000 #define DATA_SET_MAX_NAME_LENGTH 64 /* is 32 according to standard! */ -#define OUTSTANDING_CALLS 12 typedef struct sICLogicalDevice { @@ -272,7 +271,7 @@ iedConnection_allocateOutstandingCall(IedConnection self) int i = 0; - for (i = 0; i < OUTSTANDING_CALLS; i++) + for (i = 0; i < self->maxOutstandingCalled; i++) { if (self->outstandingCalls[i].used == false) { @@ -306,7 +305,7 @@ iedConnection_lookupOutstandingCall(IedConnection self, uint32_t invokeId) int i = 0; - for (i = 0; i < OUTSTANDING_CALLS; i++) + for (i = 0; i < self->maxOutstandingCalled; i++) { if ((self->outstandingCalls[i].used) && (self->outstandingCalls[i].invokeId == invokeId)) { @@ -717,7 +716,8 @@ createNewConnectionObject(TLSConfiguration tlsConfig, bool useThreads) self->reportHandlerMutex = Semaphore_create(1); self->outstandingCallsLock = Semaphore_create(1); - self->outstandingCalls = (IedConnectionOutstandingCall) GLOBAL_CALLOC(OUTSTANDING_CALLS, sizeof(struct sIedConnectionOutstandingCall)); + self->maxOutstandingCalled = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED; + self->outstandingCalls = (IedConnectionOutstandingCall) GLOBAL_CALLOC(CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED, sizeof(struct sIedConnectionOutstandingCall)); self->connectionTimeout = DEFAULT_CONNECTION_TIMEOUT; @@ -762,6 +762,29 @@ IedConnection_setLocalAddress(IedConnection self, const char* localIpAddress, in IsoConnectionParameters_setLocalTcpParameters(isoP, localIpAddress, localPort); } +void +IedConnection_setMaxOutstandingCalls(IedConnection self, int calling, int called) +{ + if (calling < 1) + calling = 1; + + if (called < 1) + called = 1; + + if (self->outstandingCalls) + { + GLOBAL_FREEMEM(self->outstandingCalls); + } + + self->maxOutstandingCalled = called; + self->outstandingCalls = (IedConnectionOutstandingCall)GLOBAL_CALLOC(called, sizeof(struct sIedConnectionOutstandingCall)); + + if (self->connection) + { + MmsConnnection_setMaxOutstandingCalls(self->connection, calling, called); + } +} + void IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs) { @@ -771,7 +794,8 @@ IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs) void IedConnection_setRequestTimeout(IedConnection self, uint32_t timeoutInMs) { - if (self->connection) { + if (self->connection) + { MmsConnection_setRequestTimeout(self->connection, timeoutInMs); } } diff --git a/src/iec61850/inc/iec61850_client.h b/src/iec61850/inc/iec61850_client.h index 06efd917..5946bd00 100644 --- a/src/iec61850/inc/iec61850_client.h +++ b/src/iec61850/inc/iec61850_client.h @@ -266,6 +266,16 @@ IedConnection_setLocalAddress(IedConnection self, const char* localIpAddress, in LIB61850_API void IedConnection_setConnectTimeout(IedConnection self, uint32_t timeoutInMs); +/** + * \brief Set the maximum number outstanding calls allowed for this connection + * + * \param self the connection object + * \param calling the maximum outstanding calls allowed by the caller (client) + * \param called the maximum outstanding calls allowed by the called endpoint (server) + */ +LIB61850_API void +IedConnection_setMaxOutstandingCalls(IedConnection self, int calling, int called); + /** * \brief set the request timeout in ms * diff --git a/src/iec61850/inc_private/ied_connection_private.h b/src/iec61850/inc_private/ied_connection_private.h index f0f48247..52467747 100644 --- a/src/iec61850/inc_private/ied_connection_private.h +++ b/src/iec61850/inc_private/ied_connection_private.h @@ -71,6 +71,7 @@ struct sIedConnection Semaphore outstandingCallsLock; IedConnectionOutstandingCall outstandingCalls; + int maxOutstandingCalled; IedConnectionClosedHandler connectionCloseHandler; void* connectionClosedParameter; diff --git a/src/mms/inc/mms_client_connection.h b/src/mms/inc/mms_client_connection.h index 86f12c9b..7447b33b 100644 --- a/src/mms/inc/mms_client_connection.h +++ b/src/mms/inc/mms_client_connection.h @@ -160,6 +160,16 @@ MmsConnection_setFilestoreBasepath(MmsConnection self, const char* basepath); LIB61850_API void MmsConnection_setRequestTimeout(MmsConnection self, uint32_t timeoutInMs); +/** + * \brief Set the maximum number outstanding calls allowed for this connection + * + * \param self MmsConnection instance to operate on + * \param calling the maximum outstanding calls allowed by the caller (client) + * \param called the maximum outstanding calls allowed by the called endpoint (server) + */ +LIB61850_API void +MmsConnnection_setMaxOutstandingCalls(MmsConnection self, int calling, int called); + /** * \brief Get the request timeout in ms for this connection * diff --git a/src/mms/inc_private/mms_client_internal.h b/src/mms/inc_private/mms_client_internal.h index aa0e60f3..5a7b2242 100644 --- a/src/mms/inc_private/mms_client_internal.h +++ b/src/mms/inc_private/mms_client_internal.h @@ -95,6 +95,8 @@ struct sMmsConnection { Semaphore outstandingCallsLock; MmsOutstandingCall outstandingCalls; + int maxOutstandingCalled; + int maxOutstandingCalling; uint32_t requestTimeout; uint32_t connectTimeout; diff --git a/src/mms/inc_private/mms_common_internal.h b/src/mms/inc_private/mms_common_internal.h index 0c508fbf..61faea58 100644 --- a/src/mms/inc_private/mms_common_internal.h +++ b/src/mms/inc_private/mms_common_internal.h @@ -30,8 +30,6 @@ #include "byte_buffer.h" #include "mms_server.h" -#define DEFAULT_MAX_SERV_OUTSTANDING_CALLING 5 -#define DEFAULT_MAX_SERV_OUTSTANDING_CALLED 5 #define DEFAULT_DATA_STRUCTURE_NESTING_LEVEL 10 typedef struct sMmsOutstandingCall* MmsOutstandingCall; diff --git a/src/mms/iso_mms/client/mms_client_connection.c b/src/mms/iso_mms/client/mms_client_connection.c index 3b5ed25a..e92f8046 100644 --- a/src/mms/iso_mms/client/mms_client_connection.c +++ b/src/mms/iso_mms/client/mms_client_connection.c @@ -37,7 +37,6 @@ #define CONFIG_MMS_CONNECTION_DEFAULT_TIMEOUT 5000 #define CONFIG_MMS_CONNECTION_DEFAULT_CONNECT_TIMEOUT 10000 -#define OUTSTANDING_CALLS 10 static void setConnectionState(MmsConnection self, MmsConnectionState newState) @@ -267,7 +266,7 @@ checkForOutstandingCall(MmsConnection self, uint32_t invokeId) Semaphore_wait(self->outstandingCallsLock); - for (i = 0; i < OUTSTANDING_CALLS; i++) + for (i = 0; i < self->maxOutstandingCalled; i++) { if (self->outstandingCalls[i].isUsed) { @@ -291,7 +290,7 @@ addToOutstandingCalls(MmsConnection self, uint32_t invokeId, eMmsOutstandingCall Semaphore_wait(self->outstandingCallsLock); - for (i = 0; i < OUTSTANDING_CALLS; i++) + for (i = 0; i < self->maxOutstandingCalled; i++) { if (self->outstandingCalls[i].isUsed == false) { @@ -319,7 +318,7 @@ removeFromOutstandingCalls(MmsConnection self, uint32_t invokeId) Semaphore_wait(self->outstandingCallsLock); - for (i = 0; i < OUTSTANDING_CALLS; i++) + for (i = 0; i < self->maxOutstandingCalled; i++) { if (self->outstandingCalls[i].isUsed) { @@ -341,7 +340,7 @@ mmsClient_getMatchingObtainFileRequest(MmsConnection self, const char* filename) Semaphore_wait(self->outstandingCallsLock); - for (i = 0; i < OUTSTANDING_CALLS; i++) + for (i = 0; i < self->maxOutstandingCalled; i++) { if (self->outstandingCalls[i].isUsed) { @@ -1088,7 +1087,7 @@ mmsIsoCallback(IsoIndication indication, void* parameter, ByteBuffer* payload) int i = 0; - for (i = 0; i < OUTSTANDING_CALLS; i++) + for (i = 0; i < self->maxOutstandingCalled; i++) { Semaphore_wait(self->outstandingCallsLock); @@ -1140,7 +1139,7 @@ mmsIsoCallback(IsoIndication indication, void* parameter, ByteBuffer* payload) { int i; - for (i = 0; i < OUTSTANDING_CALLS; i++) + for (i = 0; i < self->maxOutstandingCalled; i++) { Semaphore_wait(self->outstandingCallsLock); @@ -1617,7 +1616,9 @@ MmsConnection_createInternal(TLSConfiguration tlsConfig, bool createThread) self->concludeHandlerParameter = NULL; self->concludeTimeout = 0; - self->outstandingCalls = (MmsOutstandingCall) GLOBAL_CALLOC(OUTSTANDING_CALLS, sizeof(struct sMmsOutstandingCall)); + self->maxOutstandingCalling = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING; + self->maxOutstandingCalled = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED; + self->outstandingCalls = (MmsOutstandingCall) GLOBAL_CALLOC(CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED, sizeof(struct sMmsOutstandingCall)); self->isoParameters = IsoConnectionParameters_create(); @@ -1783,6 +1784,25 @@ MmsConnection_setRequestTimeout(MmsConnection self, uint32_t timeoutInMs) self->requestTimeout = timeoutInMs; } +void +MmsConnnection_setMaxOutstandingCalls(MmsConnection self, int calling, int called) +{ + if (calling < 1) + calling = 1; + + if (called < 1) + called = 1; + + if (self->outstandingCalls) + { + GLOBAL_FREEMEM(self->outstandingCalls); + } + + self->maxOutstandingCalling = calling; + self->maxOutstandingCalled = called; + self->outstandingCalls = (MmsOutstandingCall)GLOBAL_CALLOC(called, sizeof(struct sMmsOutstandingCall)); +} + uint32_t MmsConnection_getRequestTimeout(MmsConnection self) { diff --git a/src/mms/iso_mms/client/mms_client_initiate.c b/src/mms/iso_mms/client/mms_client_initiate.c index fdd9b94e..8eb930de 100644 --- a/src/mms/iso_mms/client/mms_client_initiate.c +++ b/src/mms/iso_mms/client/mms_client_initiate.c @@ -39,18 +39,16 @@ static uint8_t servicesSupported[] = { 0xee, 0x1c, 0x00, 0x00, 0x04, 0x08, 0x00, void mmsClient_createInitiateRequest(MmsConnection self, ByteBuffer* message) { - int maxServerOutstandingCalling = DEFAULT_MAX_SERV_OUTSTANDING_CALLING; - int maxServerOutstandingCalled = DEFAULT_MAX_SERV_OUTSTANDING_CALLED; int dataStructureNestingLevel = DEFAULT_DATA_STRUCTURE_NESTING_LEVEL; uint32_t localDetailSize = BerEncoder_UInt32determineEncodedSize(self->parameters.maxPduSize); uint32_t proposedMaxServerOutstandingCallingSize = - BerEncoder_UInt32determineEncodedSize(maxServerOutstandingCalling); + BerEncoder_UInt32determineEncodedSize(self->maxOutstandingCalling); uint32_t proposedMaxServerOutstandingCalledSize = - BerEncoder_UInt32determineEncodedSize(maxServerOutstandingCalled); + BerEncoder_UInt32determineEncodedSize(self->maxOutstandingCalled); uint32_t dataStructureNestingLevelSize = BerEncoder_UInt32determineEncodedSize(dataStructureNestingLevel); @@ -76,11 +74,11 @@ mmsClient_createInitiateRequest(MmsConnection self, ByteBuffer* message) /* proposedMaxServerOutstandingCalling */ bufPos = BerEncoder_encodeTL(0x81, proposedMaxServerOutstandingCallingSize, buffer, bufPos); - bufPos = BerEncoder_encodeUInt32(maxServerOutstandingCalling, buffer, bufPos); + bufPos = BerEncoder_encodeUInt32(self->maxOutstandingCalling, buffer, bufPos); /* proposedMaxServerOutstandingCalled */ bufPos = BerEncoder_encodeTL(0x82, proposedMaxServerOutstandingCalledSize, buffer, bufPos); - bufPos = BerEncoder_encodeUInt32(maxServerOutstandingCalled, buffer, bufPos); + bufPos = BerEncoder_encodeUInt32(self->maxOutstandingCalled, buffer, bufPos); /* proposedDataStructureNestingLevel */ bufPos = BerEncoder_encodeTL(0x83, dataStructureNestingLevelSize, buffer, bufPos); @@ -169,8 +167,8 @@ mmsClient_parseInitiateResponse(MmsConnection self, ByteBuffer* response) { self->parameters.maxPduSize = CONFIG_MMS_MAXIMUM_PDU_SIZE; self->parameters.dataStructureNestingLevel = DEFAULT_DATA_STRUCTURE_NESTING_LEVEL; - self->parameters.maxServOutstandingCalled = DEFAULT_MAX_SERV_OUTSTANDING_CALLED; - self->parameters.maxServOutstandingCalling = DEFAULT_MAX_SERV_OUTSTANDING_CALLING; + self->parameters.maxServOutstandingCalled = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED; + self->parameters.maxServOutstandingCalling = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING; int bufPos = 1; /* ignore tag - already checked */ @@ -203,16 +201,16 @@ mmsClient_parseInitiateResponse(MmsConnection self, ByteBuffer* response) case 0x81: /* proposed-max-serv-outstanding-calling */ self->parameters.maxServOutstandingCalling = BerDecoder_decodeUint32(buffer, length, bufPos); - if (self->parameters.maxServOutstandingCalling > DEFAULT_MAX_SERV_OUTSTANDING_CALLING) - self->parameters.maxServOutstandingCalling = DEFAULT_MAX_SERV_OUTSTANDING_CALLING; + if (self->parameters.maxServOutstandingCalling > CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING) + self->parameters.maxServOutstandingCalling = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING; break; case 0x82: /* proposed-max-serv-outstanding-called */ self->parameters.maxServOutstandingCalled = BerDecoder_decodeUint32(buffer, length, bufPos); - if (self->parameters.maxServOutstandingCalled > DEFAULT_MAX_SERV_OUTSTANDING_CALLED) - self->parameters.maxServOutstandingCalled = DEFAULT_MAX_SERV_OUTSTANDING_CALLED; + if (self->parameters.maxServOutstandingCalled > CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED) + self->parameters.maxServOutstandingCalled = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED; break; case 0x83: /* proposed-data-structure-nesting-level */ diff --git a/src/mms/iso_mms/server/mms_association_service.c b/src/mms/iso_mms/server/mms_association_service.c index 83a32f3e..667f365d 100644 --- a/src/mms/iso_mms/server/mms_association_service.c +++ b/src/mms/iso_mms/server/mms_association_service.c @@ -330,9 +330,9 @@ parseInitiateRequestPdu(MmsServerConnection self, uint8_t* buffer, int bufPos, i self->dataStructureNestingLevel = DEFAULT_DATA_STRUCTURE_NESTING_LEVEL; - self->maxServOutstandingCalled = DEFAULT_MAX_SERV_OUTSTANDING_CALLED; + self->maxServOutstandingCalled = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED; - self->maxServOutstandingCalling = DEFAULT_MAX_SERV_OUTSTANDING_CALLING; + self->maxServOutstandingCalling = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING; self->negotiatedParameterCBC[0] = 0; self->negotiatedParameterCBC[1] = 0; @@ -367,16 +367,16 @@ parseInitiateRequestPdu(MmsServerConnection self, uint8_t* buffer, int bufPos, i case 0x81: /* proposed-max-serv-outstanding-calling */ self->maxServOutstandingCalling = BerDecoder_decodeUint32(buffer, length, bufPos); - if (self->maxServOutstandingCalling > DEFAULT_MAX_SERV_OUTSTANDING_CALLING) - self->maxServOutstandingCalling = DEFAULT_MAX_SERV_OUTSTANDING_CALLING; + if (self->maxServOutstandingCalling > CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING) + self->maxServOutstandingCalling = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLING; break; case 0x82: /* proposed-max-serv-outstanding-called */ self->maxServOutstandingCalled = BerDecoder_decodeUint32(buffer, length, bufPos); - if (self->maxServOutstandingCalled > DEFAULT_MAX_SERV_OUTSTANDING_CALLED) - self->maxServOutstandingCalled = DEFAULT_MAX_SERV_OUTSTANDING_CALLED; + if (self->maxServOutstandingCalled > CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED) + self->maxServOutstandingCalled = CONFIG_DEFAULT_MAX_SERV_OUTSTANDING_CALLED; break; case 0x83: /* proposed-data-structure-nesting-level */