Request time out not properly handled
At commit d3acd23a35ad89c8ab67e55d3a0d2c8ce3fc6b70
, client does not receive request time out event any more.
Following refactoring activities, it seems that an incorrect event handler is called on request time out:
diff --git a/csrc/secure_channels/sopc_chunks_mgr.c b/csrc/secure_channels/sopc_chunks_mgr.c
index 75a82f3..207516b 100644
--- a/csrc/secure_channels/sopc_chunks_mgr.c
+++ b/csrc/secure_channels/sopc_chunks_mgr.c
@@ -54,7 +54,7 @@ static uint32_t SC_Client_StartRequestTimeout(uint32_t connectionIdx, uint32_t r
event.eltId = connectionIdx;
event.params = NULL;
event.auxParam = requestId;
- return SOPC_EventTimer_Create(secureChannelsInputEventHandler, event, SOPC_REQUEST_TIMEOUT_MS);
+ return SOPC_EventTimer_Create(secureChannelsTimerEventHandler, event, SOPC_REQUEST_TIMEOUT_MS);
}
This issue also highlights the fact that events are separated into two enumerated values which share common values.
Objectives of this issues are:
- fix the incorrect handler call
- add an offset into the second enumerate to avoid enumerated values collision
- add regression tests if possible