summaryrefslogtreecommitdiffstats
path: root/server/red_channel.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-11-07 12:30:47 +0200
committerAlon Levy <alevy@redhat.com>2011-02-07 19:22:44 +0200
commit0512726b680a3cfcbe0081d188ec1a4c39cd2434 (patch)
tree133fe5f257cf4982ec9dd954c2ed7aed92ffa9de /server/red_channel.c
parent26dda37c27b87b63d2603b0e9279334ce870b142 (diff)
downloadspice-0512726b680a3cfcbe0081d188ec1a4c39cd2434.tar.gz
spice-0512726b680a3cfcbe0081d188ec1a4c39cd2434.tar.xz
spice-0512726b680a3cfcbe0081d188ec1a4c39cd2434.zip
server/red_channel (tunnel): change sig of red_channel_handle_message
for later usage with red_worker
Diffstat (limited to 'server/red_channel.c')
-rw-r--r--server/red_channel.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index be66dfb3..6f3ed73c 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -387,15 +387,16 @@ void red_channel_init_outgoing_messages_window(RedChannel *channel)
red_channel_push(channel);
}
-int red_channel_handle_message(RedChannel *channel, SpiceDataHeader *header, uint8_t *msg)
+int red_channel_handle_message(RedChannel *channel, uint32_t size,
+ uint16_t type, void *message)
{
- switch (header->type) {
+ switch (type) {
case SPICE_MSGC_ACK_SYNC:
- if (header->size != sizeof(uint32_t)) {
+ if (size != sizeof(uint32_t)) {
red_printf("bad message size");
return FALSE;
}
- channel->ack_data.client_generation = *(uint32_t *)(msg);
+ channel->ack_data.client_generation = *(uint32_t *)(message);
break;
case SPICE_MSGC_ACK:
if (channel->ack_data.client_generation == channel->ack_data.generation) {
@@ -404,7 +405,7 @@ int red_channel_handle_message(RedChannel *channel, SpiceDataHeader *header, uin
}
break;
default:
- red_printf("invalid message type %u", header->type);
+ red_printf("invalid message type %u", type);
return FALSE;
}
return TRUE;