[Spice-commits] 2 commits - configure.ac server/Makefile.am server/reds.c server/tests
Frediano Ziglio
fziglio at kemper.freedesktop.org
Tue Feb 16 11:22:43 UTC 2016
configure.ac | 3 +++
server/Makefile.am | 2 ++
server/reds.c | 8 ++++----
server/tests/Makefile.am | 5 +++--
4 files changed, 12 insertions(+), 6 deletions(-)
New commits:
commit 1438b7ccf28157c649e5ce7c2839943e84d087a3
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Fri Feb 20 15:00:02 2015 -0600
Add GObject to build requirements
Preparation for GObject-ifying some internals
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/configure.ac b/configure.ac
index 2b09ec7..3396c71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,6 +106,9 @@ AC_SUBST([SPICE_PROTOCOL_MIN_VER])
PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.22])
AS_VAR_APPEND([SPICE_REQUIRES], [" glib-2.0 >= 2.22"])
+PKG_CHECK_MODULES([GOBJECT2], [gobject-2.0 >= 2.22])
+AS_VAR_APPEND([SPICE_REQUIRES], [" gobject-2.0 >= 2.22"])
+
PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
AC_SUBST(PIXMAN_CFLAGS)
AC_SUBST(PIXMAN_LIBS)
diff --git a/server/Makefile.am b/server/Makefile.am
index 411a0d9..9eb5f44 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-DRED_STATISTICS \
$(COMMON_CFLAGS) \
$(GLIB2_CFLAGS) \
+ $(GOBJECT2_CFLAGS) \
$(LZ4_CFLAGS) \
$(PIXMAN_CFLAGS) \
$(SASL_CFLAGS) \
@@ -37,6 +38,7 @@ libserver_la_LIBADD = \
$(top_builddir)/spice-common/common/libspice-common-server.la \
$(GL_LIBS) \
$(GLIB2_LIBS) \
+ $(GOBJECT2_LIBS) \
$(JPEG_LIBS) \
$(LZ4_LIBS) \
$(LIBRT) \
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 7fd7d66..b3e9740 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -1,7 +1,6 @@
NULL =
AM_CPPFLAGS = \
- $(GLIB2_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/common \
-I$(top_srcdir)/server \
@@ -9,6 +8,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/server/tests \
$(COMMON_CFLAGS) \
$(GLIB2_CFLAGS) \
+ $(GOBJECT2_CFLAGS) \
$(SMARTCARD_CFLAGS) \
$(SPICE_NONPKGCONFIG_CFLAGS) \
$(SPICE_PROTOCOL_CFLAGS) \
@@ -32,7 +32,8 @@ LDADD = \
$(top_builddir)/spice-common/common/libspice-common.la \
$(top_builddir)/server/libserver.la \
$(GLIB2_LIBS) \
- $(SPICE_NONPKGCONFIG_LIBS) \
+ $(GOBJECT2_LIBS) \
+ $(SPICE_NONPKGCONFIG_LIBS) \
$(NULL)
TESTS = \
commit 2db21168d81f42a1aa306dcef17e8922b9c94bb0
Author: Christophe Fergeau <cfergeau at redhat.com>
Date: Fri Feb 20 17:00:53 2015 +0100
Remove redundant argument to vdi_port_read_buf_process
The 'port' argument can be determined from VDIPortState, so no need to
pass both (through RedsState) to vdi_port_read_buf_process().
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/reds.c b/server/reds.c
index a1d3c72..99d7377 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -632,12 +632,12 @@ static void vdi_port_read_buf_release(uint8_t *data, void *opaque)
}
/* returns TRUE if the buffer can be forwarded */
-static int vdi_port_read_buf_process(RedsState *reds, int port, VDIReadBuf *buf)
+static int vdi_port_read_buf_process(RedsState *reds, VDIReadBuf *buf)
{
VDIPortState *state = &reds->agent_state;
int res;
- switch (port) {
+ switch (state->vdi_chunk_header.port) {
case VDP_CLIENT_PORT: {
res = agent_msg_filter_process_data(&state->read_filter,
buf->data, buf->len);
@@ -758,7 +758,7 @@ static SpiceCharDeviceMsgToClient *vdi_port_read_one_msg_from_device(SpiceCharDe
} else {
state->read_state = VDI_PORT_READ_STATE_GET_BUFF;
}
- if (vdi_port_read_buf_process(reds, state->vdi_chunk_header.port, dispatch_buf)) {
+ if (vdi_port_read_buf_process(reds, dispatch_buf)) {
return dispatch_buf;
} else {
vdi_port_read_buf_unref(dispatch_buf);
@@ -1128,7 +1128,7 @@ void reds_on_main_channel_migrate(RedsState *reds, MainChannelClient *mcc)
!agent_state->read_filter.msg_data_to_read);
read_buf->len = read_data_len;
- if (vdi_port_read_buf_process(reds, agent_state->vdi_chunk_header.port, read_buf)) {
+ if (vdi_port_read_buf_process(reds, read_buf)) {
main_channel_client_push_agent_data(mcc,
read_buf->data,
read_buf->len,
More information about the Spice-commits
mailing list