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.
This commit is contained in:
Michal Privoznik 2012-12-05 11:59:36 +01:00
parent 5c9955df09
commit 3b810b7768

View File

@ -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);
}