From ab2c10ef51deee80d4c0e9fb414a7ef1a7018301 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 30 Oct 2012 16:16:59 -0700 Subject: [PATCH] Actually handle audio/video part of preamble. --- guacd/src/daemon.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/guacd/src/daemon.c b/guacd/src/daemon.c index 120b6b53..d8581d52 100644 --- a/guacd/src/daemon.c +++ b/guacd/src/daemon.c @@ -200,6 +200,18 @@ void guacd_handle_connection(int fd) { client->info.optimal_width = atoi(size->argv[0]); client->info.optimal_height = atoi(size->argv[1]); + /* Store audio mimetypes */ + client->info.audio_mimetypes = malloc(sizeof(char*) * (audio->argc+1)); + memcpy(client->info.audio_mimetypes, audio->argv, + sizeof(char*) * audio->argc); + client->info.audio_mimetypes[audio->argc] = NULL; + + /* Store video mimetypes */ + client->info.video_mimetypes = malloc(sizeof(char*) * (video->argc+1)); + memcpy(client->info.video_mimetypes, video->argv, + sizeof(char*) * video->argc); + client->info.video_mimetypes[video->argc] = NULL; + /* Init client */ init_result = guac_client_plugin_init_client(plugin, client, connect->argc, connect->argv); @@ -227,6 +239,10 @@ void guacd_handle_connection(int fd) { else guacd_log_info("Client finished normally"); + /* Free mimetype lists */ + free(client->info.audio_mimetypes); + free(client->info.video_mimetypes); + /* Clean up */ guac_client_free(client); if (guac_client_plugin_close(plugin))