summaryrefslogtreecommitdiff
path: root/vdagent
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2019-03-04 13:53:16 -0600
committerFrediano Ziglio <fziglio@redhat.com>2019-03-05 13:50:08 +0000
commit8bbb89e92b6b0ebfdeeb32ad11f96922bed29ad4 (patch)
tree06e5f01b37cdbe2d82ad15987139049d800f6d22 /vdagent
parent5f0f3b590aecbfef2a6c1613383e2fcef1cc5126 (diff)
Don't exit when receiving unknown messages
In 8251fa25, a check on the minimum size of a message was introduced. For unsupported messages, the vdagent simply exited. This makes it inconsistent with previous behavior and inconsistent with the behavior of the linux vdagent. Instead, just print a warning indicating that an unsupported message was received and ignore it. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'vdagent')
-rw-r--r--vdagent/vdagent.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index 89019bb..177e663 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -1288,8 +1288,7 @@ void VDAgent::dispatch_message(VDAgentMessage* msg, uint32_t port)
break;
}
if (min_size < 0) {
- vd_printf("Unsupported message type %u size %u", msg->type, msg->size);
- _running = false;
+ vd_printf("Unsupported message type %u size %u, ignoring", msg->type, msg->size);
return;
}
if (msg->size < (unsigned) min_size) {