mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-02 22:47:39 +00:00
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:
parent
5c9955df09
commit
3b810b7768
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user