Open vetss opened 6 years ago
Hello @StanislawLeja
The initial fix was done by @StanislawLeja in the PR https://github.com/RestComm/smscgateway/pull/251.
I have added the PR + my suggested fix into (and SMSSC GW latest code) https://github.com/vetss/smscgateway/commits/smsc_44_Split_message_cache
My comments for a previous solution:
removeOldReferenceNumbers()
at any segement may waste resources. I added some timer for periodically checking (check my fix)splitMessageData
that means no synching between different concurrent invocations. I tried to refactor code (check my fix) to concantrate all updated in a single synchronised code segmentWhat is till missed: 1) I have not tested, we need to make this step at a live server 2) the functionality must be optional and turned off by default, we need to add CLI / GUI for it We may use of CLI templeate for enabling (if no objections)
RemoveOlderThanXSeconds
. Should we add it ?
5) I do not understand why we need SplitMessageCacheStruct
class. If it is not needed, better to remove it.
We need to add cache for incoming already splitted messages. This cache will contain correlation between a message segement reference_number + source_address + dest_address and a SMSC GW's messageId of a first found message segment. This value will be then logged into a CDR. This functionality demands extra processing and must be optional and turned off by default.