diff options
author | Arnon Gilboa <agilboa@redhat.com> | 2013-05-05 15:58:15 +0300 |
---|---|---|
committer | Arnon Gilboa <agilboa@redhat.com> | 2013-05-09 14:19:11 +0300 |
commit | e55103589a62460a1128625740ec8c9126adeb64 (patch) | |
tree | 14732e0832f82074994bc4299499a893aa91facf /vdagent | |
parent | 877ee81f813ccaeb5a75bd58f933b769ba137f84 (diff) |
vdagent: add support for VD_AGENT_CLIENT_DISCONNECTED
vdagent is stopped, so a new instance is to be launched by vdservice.
imho, this seems simpler than cleaning agent in/out msg state and
reseting the vio-serial device to cleanup pending msgs.
rhbz #956133
Diffstat (limited to 'vdagent')
-rw-r--r-- | vdagent/vdagent.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp index 4d9287e..68b311e 100644 --- a/vdagent/vdagent.cpp +++ b/vdagent/vdagent.cpp @@ -1231,6 +1231,10 @@ void VDAgent::dispatch_message(VDAgentMessage* msg, uint32_t port) case VD_AGENT_ANNOUNCE_CAPABILITIES: res = a->handle_announce_capabilities((VDAgentAnnounceCapabilities*)msg->data, msg->size); break; + case VD_AGENT_CLIENT_DISCONNECTED: + vd_printf("Client disconnected, agent to be restarted"); + a->set_control_event(CONTROL_STOP); + break; default: vd_printf("Unsupported message type %u size %u", msg->type, msg->size); } |