summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-11-10 16:28:07 +0200
committerAlon Levy <alevy@redhat.com>2011-11-10 16:28:07 +0200
commit6d89b2ba4c6e29a4e40cfb15073e92aa47955f5e (patch)
treec776e60d21b170658b2030a5ece1e4d2ef3676a1 /server
parentebfa95cd4777ce3f0fcf3b6866bd30f643854809 (diff)
downloadspice-6d89b2ba4c6e29a4e40cfb15073e92aa47955f5e.tar.gz
spice-6d89b2ba4c6e29a4e40cfb15073e92aa47955f5e.tar.xz
spice-6d89b2ba4c6e29a4e40cfb15073e92aa47955f5e.zip
server/main_channel: fix pointer-to-int-cast error
64 bit-ism removed.
Diffstat (limited to 'server')
-rw-r--r--server/main_channel.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/main_channel.c b/server/main_channel.c
index 0ce3b486..4b5b6698 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -213,13 +213,18 @@ static PipeItem *main_ping_item_new(MainChannelClient *mcc, int size)
return &item->base;
}
+typedef struct MainTokensItemInfo {
+ uint32_t num_tokens;
+} MainTokensItemInfo;
+
static PipeItem *main_tokens_item_new(RedChannelClient *rcc, void *data, int num)
{
TokensPipeItem *item = spice_malloc(sizeof(TokensPipeItem));
+ MainTokensItemInfo *init = data;
red_channel_pipe_item_init(rcc->channel, &item->base,
SPICE_MSG_MAIN_AGENT_TOKEN);
- item->tokens = (uint64_t)data;
+ item->tokens = init->num_tokens;
return &item->base;
}
@@ -387,8 +392,10 @@ static void main_channel_marshall_agent_disconnected(SpiceMarshaller *m)
// TODO: make this targeted (requires change to agent token accounting)
void main_channel_push_tokens(MainChannel *main_chan, uint32_t num_tokens)
{
+ MainTokensItemInfo init = {.num_tokens = num_tokens};
+
red_channel_pipes_new_add_push(&main_chan->base,
- main_tokens_item_new, (void*)(uint64_t)num_tokens);
+ main_tokens_item_new, &init);
}
static void main_channel_marshall_tokens(SpiceMarshaller *m, uint32_t num_tokens)