[Spice-commits] 2 commits - server/dcc-send.c server/reds.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Fri Dec 11 07:03:12 PST 2015
server/dcc-send.c | 5 ++---
server/reds.c | 4 ++--
2 files changed, 4 insertions(+), 5 deletions(-)
New commits:
commit 9c56c884adc958fcb19373513b59a68e248e93cc
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Tue Aug 4 16:05:38 2015 +0100
dcc: do not cause problem with multiple threads.
With multiple cards configured you can have multiple workers running in
different thread.
With such configuration static variables not syncronized could lead
to undefined behavior.
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
diff --git a/server/dcc-send.c b/server/dcc-send.c
index a8f42db..c3f79ef 100644
--- a/server/dcc-send.c
+++ b/server/dcc-send.c
@@ -682,9 +682,8 @@ static void red_pipe_replace_rendered_drawables_with_images(DisplayChannelClient
int first_surface_id,
SpiceRect *first_area)
{
- /* TODO: can't have those statics with multiple clients */
- static int resent_surface_ids[MAX_PIPE_SIZE];
- static SpiceRect resent_areas[MAX_PIPE_SIZE]; // not pointers since drawbales may be released
+ int resent_surface_ids[MAX_PIPE_SIZE];
+ SpiceRect resent_areas[MAX_PIPE_SIZE]; // not pointers since drawables may be released
int num_resent;
PipeItem *pipe_item;
Ring *pipe;
commit 765b5209ef0434cf216a7a5277037e15b0d491a1
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Aug 28 09:37:04 2015 +0100
reds: do not use g_malloc0 in server code
The rest of code is using spice_malloc* functions, use them for
consistency.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
diff --git a/server/reds.c b/server/reds.c
index 31362ef..e8cf168 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1888,7 +1888,7 @@ static void reds_handle_ticket(void *opaque)
RSA_size(link->tiTicketing.rsa), SPICE_MAX_PASSWORD_LENGTH);
}
- password = g_malloc0(RSA_size(link->tiTicketing.rsa) + 1);
+ password = spice_malloc0(RSA_size(link->tiTicketing.rsa) + 1);
password_size = RSA_private_decrypt(link->tiTicketing.rsa_size,
link->tiTicketing.encrypted_ticket.encrypted_data,
(unsigned char *)password,
@@ -1928,7 +1928,7 @@ error:
reds_link_free(link);
end:
- g_free(password);
+ free(password);
}
static void reds_get_spice_ticket(RedLinkInfo *link)
More information about the Spice-commits
mailing list