codec: not-a-first segmented with zero payload allowed

This commit is contained in:
Matej Sekoranja
2014-03-27 23:55:17 +01:00
parent 452bbbc2b2
commit f72c813991
4 changed files with 41 additions and 8 deletions
+5
View File
@@ -167,6 +167,11 @@ namespace epics {
bool notFirstSegment = (_flags & 0x20) != 0;
if (notFirstSegment)
{
// not-first segmented message with zero payload is "kind of" valid
// TODO this should check if previous message was first- or middle-segmented message
if (_payloadSize == 0)
continue;
LOG(logLevelWarn,
"Not-a-frst segmented message received in normal mode"
" from the client at %s:%d: %s, disconnecting...",