[PATCH 03/15] Change vdi_port_read_buf_get() to take RedsState arg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jonathon Jongsma <jjongsma@xxxxxxxxxx>

---
 server/reds.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index b347d1d..928cb83 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -212,7 +212,7 @@ static void reds_char_device_add_state(SpiceCharDeviceState *st);
 static void reds_char_device_remove_state(SpiceCharDeviceState *st);
 static void reds_send_mm_time(void);
 
-static VDIReadBuf *vdi_port_read_buf_get(void);
+static VDIReadBuf *vdi_port_read_buf_get(RedsState *reds);
 static VDIReadBuf *vdi_port_read_buf_ref(VDIReadBuf *buf);
 static void vdi_port_read_buf_unref(VDIReadBuf *buf);
 
@@ -690,7 +690,7 @@ static int vdi_port_read_buf_process(RedsState *reds, int port, VDIReadBuf *buf)
     }
 }
 
-static VDIReadBuf *vdi_port_read_buf_get(void)
+static VDIReadBuf *vdi_port_read_buf_get(RedsState *reds)
 {
     VDIPortState *state = &reds->agent_state;
     RingItem *item;
@@ -758,7 +758,7 @@ static SpiceCharDeviceMsgToClient *vdi_port_read_one_msg_from_device(SpiceCharDe
             state->message_receive_len = state->vdi_chunk_header.size;
             state->read_state = VDI_PORT_READ_STATE_GET_BUFF;
         case VDI_PORT_READ_STATE_GET_BUFF: {
-            if (!(state->current_read_buf = vdi_port_read_buf_get())) {
+            if (!(state->current_read_buf = vdi_port_read_buf_get(reds))) {
                 return NULL;
             }
             state->receive_pos = state->current_read_buf->data;
@@ -1281,7 +1281,7 @@ static int reds_agent_state_restore(SpiceMigrateDataMain *mig_data)
             uint32_t cur_buf_size;
 
             agent_state->read_state = VDI_PORT_READ_STATE_READ_DATA;
-            agent_state->current_read_buf = vdi_port_read_buf_get();
+            agent_state->current_read_buf = vdi_port_read_buf_get(reds);
             spice_assert(agent_state->current_read_buf);
             partial_msg_header = (uint8_t *)mig_data + mig_data->agent2client.msg_header_ptr -
                 sizeof(SpiceMiniDataHeader);
-- 
2.4.3

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]