Re: [Spice-devel] [PATCH win-vdagent v2] Don't exit when receiving unknown messages

2019-03-05 Thread Frediano Ziglio
> 
> 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 

Acked-by: Frediano Ziglio 

> ---
> changes in v2:
>  - change rationale in commit log
> 
>  vdagent/vdagent.cpp | 3 +--
>  1 file changed, 1 insertion(+), 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) {
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH win-vdagent v2] Don't exit when receiving unknown messages

2019-03-04 Thread Jonathon Jongsma
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 
---
changes in v2:
 - change rationale in commit log

 vdagent/vdagent.cpp | 3 +--
 1 file changed, 1 insertion(+), 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) {
-- 
2.17.2

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel