Add "Ex" interface support for external channels
authorArmin Novak <armin.novak@thincast.com>
Wed, 28 Dec 2016 10:21:14 +0000 (11:21 +0100)
committerBernhard Miklautz <bernhard.miklautz@thincast.com>
Wed, 28 Dec 2016 10:21:14 +0000 (11:21 +0100)
Support the VirtualChannelEntryEx interface also for channels that are
not static (as in compiled in).

libfreerdp/common/addin.c

index b9b49d4..d5476c4 100644 (file)
@@ -305,7 +305,12 @@ PVIRTUALCHANNELENTRY freerdp_load_dynamic_channel_addin_entry(LPCSTR pszName,
        /* channel add-in */
 
        if (dwFlags & FREERDP_ADDIN_CHANNEL_STATIC)
-               entry = freerdp_load_dynamic_addin(pszFileName, NULL, "VirtualChannelEntry");
+       {
+               if (dwFlags & FREERDP_ADDIN_CHANNEL_ENTRYEX)
+                       entry = freerdp_load_dynamic_addin(pszFileName, NULL, "VirtualChannelEntryEx");
+               else
+                       entry = freerdp_load_dynamic_addin(pszFileName, NULL, "VirtualChannelEntry");
+       }
        else if (dwFlags & FREERDP_ADDIN_CHANNEL_DYNAMIC)
                entry = freerdp_load_dynamic_addin(pszFileName, NULL, "DVCPluginEntry");
        else if (dwFlags & FREERDP_ADDIN_CHANNEL_DEVICE)
@@ -335,9 +340,6 @@ PVIRTUALCHANNELENTRY freerdp_load_channel_addin_entry(LPCSTR pszName,
        if (freerdp_load_static_channel_addin_entry)
                entry = freerdp_load_static_channel_addin_entry(pszName, pszSubsystem, pszType, dwFlags);
 
-       if (dwFlags & FREERDP_ADDIN_CHANNEL_ENTRYEX)
-               return entry; /* don't warn, don't try dynamic entries for VirtualChannelEntryEx */
-
        if (!entry)
                entry = freerdp_load_dynamic_channel_addin_entry(pszName, pszSubsystem, pszType, dwFlags);