Handle blob properly (decode base64).
This commit is contained in:
parent
74fc3f732e
commit
fb105b2047
@ -163,6 +163,8 @@ int __guac_handle_blob(guac_client* client, guac_instruction* instruction) {
|
|||||||
|
|
||||||
if (client->blob_handler) {
|
if (client->blob_handler) {
|
||||||
|
|
||||||
|
int length;
|
||||||
|
|
||||||
/* Validate stream index */
|
/* Validate stream index */
|
||||||
int stream_index = atoi(instruction->argv[0]);
|
int stream_index = atoi(instruction->argv[0]);
|
||||||
if (stream_index < 0 || stream_index >= GUAC_CLIENT_MAX_STREAMS) {
|
if (stream_index < 0 || stream_index >= GUAC_CLIENT_MAX_STREAMS) {
|
||||||
@ -170,13 +172,14 @@ int __guac_handle_blob(guac_client* client, guac_instruction* instruction) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Actually decode blob */
|
/* Decode base64 */
|
||||||
|
length = guac_protocol_decode_base64(instruction->argv[1]);
|
||||||
|
|
||||||
return client->blob_handler(
|
return client->blob_handler(
|
||||||
client,
|
client,
|
||||||
&(client->__streams[stream_index]),
|
&(client->__streams[stream_index]),
|
||||||
"TODO",
|
instruction->argv[1],
|
||||||
4
|
length
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user