fix: Fix partially received message parsing
fix: Fix partially received message parsing

Because we do not parse incoming FIX messages on the fly we are exposed
to the following problem: we have to distinguish between the cases when
RX buffer contains partially delivered message and when the buffer
contains a garbled FIX message. In the former case we have to wait until
the missing part is delivered and parse the whole message. In the latter
case we should consider the message to be garbled and skip it. Currently
we skip the data in both cases.

The proposed solution based on the assumption that there is a maximum
message size. So if the number of bytes to be parsed is greater than
that value we are not in the case of the message that has been partially
delivered.

Signed-off-by: Marat Stanichenko <146c4a279a7427b2cc19a19b6130cbb7ee404ab1@gmail.com>
[ add4fcd06328a394f0ad91feda7ee057316dc5ed@kernel.org: cleanups ]
Signed-off-by: Pekka Enberg <add4fcd06328a394f0ad91feda7ee057316dc5ed@kernel.org>

jvirtanen/libtrading,fengzhyuan/libtrading,etoestja/libtrading,penberg/libtrading,svdev/libtrading,Bitcoinsulting/libtrading,femtotrader/libtrading,libtrading/libtrading,divaykin/libtrading,mstanichenko/libtrading,penberg/libtrading,femtotrader/libtrading,NunoEdgarGub1/libtrading,jvirtanen/libtrading,Bitcoinsulting/libtrading,mstanichenko/libtrading,NunoEdgarGub1/libtrading,divaykin/libtrading,etoestja/libtrading,fengzhyuan/libtrading,svdev/libtrading,libtrading/libtrading