> 
> From: Christophe de Dinechin <dinec...@redhat.com>
> 
> Signed-off-by: Christophe de Dinechin <dinec...@redhat.com>
> ---
>  src/spice-streaming-agent.cpp | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
> index c4c52ef..760c211 100644
> --- a/src/spice-streaming-agent.cpp
> +++ b/src/spice-streaming-agent.cpp
> @@ -52,7 +52,7 @@ struct SpiceStreamDataMessage
>      StreamMsgData msg;
>  };
>  
> -static int streaming_requested;
> +static bool streaming_requested = false;
>  static std::set<SpiceVideoCodecType> client_codecs;
>  static bool quit;
>  static int streamfd = -1;
> @@ -97,9 +97,9 @@ static int read_command_from_stdin(void)
>      if (strcmp(cmd, "quit") == 0) {
>          quit = true;
>      } else if (strcmp(cmd, "start") == 0) {
> -        streaming_requested = 1;
> +        streaming_requested = true;
>      } else if (strcmp(cmd, "stop") == 0) {
> -        streaming_requested = 0;
> +        streaming_requested = false;
>      } else {
>          syslog(LOG_WARNING, "unknown command %s\n", cmd);
>      }
> @@ -142,7 +142,7 @@ static int read_command_from_device(void)
>                 n, hdr.size);
>          return -1;
>      }
> -    streaming_requested = msg[0]; /* num_codecs */
> +    streaming_requested = msg[0] != 0; /* num_codecs */
>      syslog(LOG_INFO, "GOT START_STOP message -- request to %s streaming\n",
>             streaming_requested ? "START" : "STOP");
>      client_codecs.clear();

Acked-by: Frediano Ziglio <fzig...@redhat.com>

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

Reply via email to