summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2012-12-05 11:59:36 +0100
committerMichal Privoznik <mprivozn@redhat.com>2012-12-05 16:29:11 +0100
commit3b810b7768ef3a64c693b6b0a33d5b2af013d34b (patch)
tree3aaa9c0d828e7e119ea0ed876b55c27f4caf1a8c
parent5c9955df09f6074c8a092c8d9bf592410677236d (diff)
session-spice: Cast CA string to gunit8 pointer
SpiceSession has 'ca' property which is type of GByteArray*. However, when we read the property from file, we read it as string. For conversion g_byte_array_new_take() is used which takes given pointer as guint8* so we need to do the cast.
-rw-r--r--src/virt-viewer-session-spice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index cdfbef8..468b8a7 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -291,7 +291,7 @@ fill_session(VirtViewerFile *file, SpiceSession *session)
gchar *ca = virt_viewer_file_get_ca(file);
g_return_if_fail(ca != NULL);
- GByteArray *ba = g_byte_array_new_take(ca, strlen(ca) + 1);
+ GByteArray *ba = g_byte_array_new_take((guint8 *)ca, strlen(ca) + 1);
g_object_set(G_OBJECT(session), "ca", ba, NULL);
g_byte_array_unref(ba);
}