guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mjum...@apache.org
Subject [32/50] incubator-guacamole-server git commit: GUAC-1164: Do not load display update channel unless needed.
Date Sun, 20 Mar 2016 02:25:02 GMT
GUAC-1164: Do not load display update channel unless needed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/3997e448
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/3997e448
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/3997e448

Branch: refs/heads/master
Commit: 3997e44810bd1c81e7c971434fa8a7fd90eafe86
Parents: de78a6e
Author: Michael Jumper <mike.jumper@guac-dev.org>
Authored: Wed Mar 16 15:02:13 2016 -0700
Committer: Michael Jumper <mike.jumper@guac-dev.org>
Committed: Wed Mar 16 15:02:13 2016 -0700

----------------------------------------------------------------------
 src/protocols/rdp/rdp.c | 39 +++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/3997e448/src/protocols/rdp/rdp.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp.c b/src/protocols/rdp/rdp.c
index ab5734f..494a28d 100644
--- a/src/protocols/rdp/rdp.c
+++ b/src/protocols/rdp/rdp.c
@@ -201,16 +201,18 @@ static void guac_rdp_channel_connected(rdpContext* context,
 BOOL rdp_freerdp_pre_connect(freerdp* instance) {
 
     rdpContext* context = instance->context;
-    guac_client* client = ((rdp_freerdp_context*) context)->client;
     rdpChannels* channels = context->channels;
+
+    guac_client* client = ((rdp_freerdp_context*) context)->client;
+    guac_rdp_client* rdp_client = (guac_rdp_client*) client->data;
+    guac_rdp_settings* settings = rdp_client->settings;
+
     rdpBitmap* bitmap;
     rdpGlyph* glyph;
     rdpPointer* pointer;
     rdpPrimaryUpdate* primary;
     CLRCONV* clrconv;
 
-    guac_rdp_client* rdp_client =
-        (guac_rdp_client*) client->data;
 
 #ifdef HAVE_FREERDP_REGISTER_ADDIN_PROVIDER
     /* Init FreeRDP add-in provider */
@@ -229,8 +231,9 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
         guac_client_log(client, GUAC_LOG_WARNING,
                 "Failed to load drdynvc plugin.");
 
-    /* Init display update plugin (if available) */
-    guac_rdp_disp_load_plugin(instance->context);
+    /* Init display update plugin (if available and required) */
+    if (settings->resize_method == GUAC_RESIZE_DISPLAY_UPDATE)
+        guac_rdp_disp_load_plugin(instance->context);
 
     /* Load clipboard plugin */
     if (freerdp_channels_load_plugin(channels, instance->settings,
@@ -239,7 +242,7 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
                 "Failed to load cliprdr plugin. Clipboard will not work.");
 
     /* If audio enabled, choose an encoder */
-    if (rdp_client->settings->audio_enabled) {
+    if (settings->audio_enabled) {
 
         rdp_client->audio = guac_audio_stream_alloc(client, NULL,
                 GUAC_RDP_AUDIO_RATE,
@@ -254,15 +257,15 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
     } /* end if audio enabled */
 
     /* Load filesystem if drive enabled */
-    if (rdp_client->settings->drive_enabled)
+    if (settings->drive_enabled)
         rdp_client->filesystem =
-            guac_rdp_fs_alloc(client, rdp_client->settings->drive_path,
-                    rdp_client->settings->create_drive_path);
+            guac_rdp_fs_alloc(client, settings->drive_path,
+                    settings->create_drive_path);
 
     /* If RDPSND/RDPDR required, load them */
-    if (rdp_client->settings->printing_enabled
-        || rdp_client->settings->drive_enabled
-        || rdp_client->settings->audio_enabled) {
+    if (settings->printing_enabled
+        || settings->drive_enabled
+        || settings->audio_enabled) {
 
         /* Load RDPDR plugin */
         if (freerdp_channels_load_plugin(channels, instance->settings,
@@ -282,15 +285,15 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
     }
 
     /* Load RAIL plugin if RemoteApp in use */
-    if (rdp_client->settings->remote_app != NULL) {
+    if (settings->remote_app != NULL) {
 
 #ifdef LEGACY_FREERDP
         RDP_PLUGIN_DATA* plugin_data = malloc(sizeof(RDP_PLUGIN_DATA) * 2);
 
         plugin_data[0].size = sizeof(RDP_PLUGIN_DATA);
-        plugin_data[0].data[0] = rdp_client->settings->remote_app;
-        plugin_data[0].data[1] = rdp_client->settings->remote_app_dir;
-        plugin_data[0].data[2] = rdp_client->settings->remote_app_args; 
+        plugin_data[0].data[0] = settings->remote_app;
+        plugin_data[0].data[1] = settings->remote_app_dir;
+        plugin_data[0].data[2] = settings->remote_app_args;
         plugin_data[0].data[3] = NULL;
 
         plugin_data[1].size = 0;
@@ -311,9 +314,9 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
     }
 
     /* Load SVC plugin instances for all static channels */
-    if (rdp_client->settings->svc_names != NULL) {
+    if (settings->svc_names != NULL) {
 
-        char** current = rdp_client->settings->svc_names;
+        char** current = settings->svc_names;
         do {
 
             guac_rdp_svc* svc = guac_rdp_alloc_svc(client, *current);


Mime
View raw message