> > To prevent confusion between Stream (a video stream) and RedStream (a > generic data stream between client and server), change the name to > VideoStream to be more explicit about what it is. > > Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> > --- > Changes in v2: > - broke long lines, changed function declaration indentation > > server/Makefile.am | 4 +- > server/dcc-private.h | 2 +- > server/dcc-send.c | 17 ++-- > server/dcc.c | 4 +- > server/dcc.h | 4 +- > server/display-channel-private.h | 8 +- > server/display-channel.c | 43 +++++----- > server/display-channel.h | 4 +- > server/red-worker.c | 6 +- > server/stream-channel.c | 2 +- > server/stream-device.c | 6 ++ > server/{stream.c => video-stream.c} | 156 > +++++++++++++++++++----------------- > server/{stream.h => video-stream.h} | 55 ++++++------- > 13 files changed, 160 insertions(+), 151 deletions(-) > rename server/{stream.c => video-stream.c} (85%) > rename server/{stream.h => video-stream.h} (65%) > > diff --git a/server/Makefile.am b/server/Makefile.am > index 20f0f1925..8ea258db3 100644 > --- a/server/Makefile.am > +++ b/server/Makefile.am > @@ -164,8 +164,6 @@ libserver_la_SOURCES = \ > stat-file.c \ > stat-file.h \ > stat.h \ > - stream.c \ > - stream.h \ > stream-channel.c \ > stream-channel.h \ > stream-device.c \ > @@ -175,6 +173,8 @@ libserver_la_SOURCES = \ > utils.c \ > utils.h \ > video-encoder.h \ > + video-stream.c \ > + video-stream.h \ > zlib-encoder.c \ > zlib-encoder.h \ > $(NULL) .... > > diff --git a/server/stream-device.c b/server/stream-device.c > index 0953a6d03..c2d6dcf25 100644 > --- a/server/stream-device.c > +++ b/server/stream-device.c > @@ -131,6 +131,8 @@ handle_msg_invalid(StreamDevice *dev, > SpiceCharDeviceInstance *sin, const char * > { > static const char default_error_msg[] = "Protocol error"; > > + spice_assert(dev->hdr_pos >= sizeof(StreamDevHeader)); > + > if (!error_msg) { > error_msg = default_error_msg; > } > @@ -189,6 +191,10 @@ handle_msg_data(StreamDevice *dev, > SpiceCharDeviceInstance *sin) > { > SpiceCharDeviceInterface *sif = spice_char_device_get_interface(sin); > int n; > + > + spice_assert(dev->hdr_pos >= sizeof(StreamDevHeader)); > + spice_assert(dev->hdr.type == STREAM_TYPE_DATA); > + > while (1) { > uint8_t buf[16 * 1024]; > n = sif->read(sin, buf, sizeof(buf)); These hunks seem a bit OT here, they were not in in this patch in previous version. Otherwise, Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx> Frediano _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel