[Spice-devel] [PATCH 03/14] streaming_requested is really a bool
Christophe de Dinechin
christophe at dinechin.org
Wed Feb 14 17:52:11 UTC 2018
From: Christophe de Dinechin <dinechin at redhat.com>
Signed-off-by: Christophe de Dinechin <dinechin at 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();
--
2.13.5 (Apple Git-94)
More information about the Spice-devel
mailing list