In FreeRDP 2.0.0-rc0 and earlier, Bitmap_Free(bitmap) invokes the free
handler of the given bitmap, frees bitmap->data, and then frees the
bitmap. The implementation-specific free handler needs to be aware only
of the implementation's own concerns.
After FreeRDP 2.0.0-rc0, Bitmap_Free(bitmap) only invokes the
implementation-specific free handler, and it's on the implementation to
know that bitmap->data must be manually freed with _aligned_free() and
bitmap must be freed with free(). The implementation-specific free
handler must be aware of the internals of the library.
See commit 8dda26a.
On some platforms, the libguacai-client.so plugin for FreeRDP reports an
unlinked symbol:
undefined symbol: guac_freerdp_dynamic_channel_collection_add (/usr/local/lib/freerdp2/libguacai-client.so)
This symbol is actually unused within the plugin, but may be referenced
due to being defined within a function in a common piece of source
shared between the plugin and the RDP support.
Separating the actual common components such that they can be included
by both the RDP support and the libguacai-client.so plugin removes the
potential for unused pieces being flagged as missing.
Without a typecast, errors like the following are generated by the
compiler:
channels/cliprdr.c: In function 'guac_rdp_cliprdr_channel_connected':
channels/cliprdr.c:477:27: error: assignment from incompatible pointer type [-Werror]
cliprdr->MonitorReady = guac_rdp_cliprdr_monitor_ready;
^
channels/cliprdr.c:478:31: error: assignment from incompatible pointer type [-Werror]
cliprdr->ServerFormatList = guac_rdp_cliprdr_format_list;
^
channels/cliprdr.c:479:38: error: assignment from incompatible pointer type [-Werror]
cliprdr->ServerFormatDataRequest = guac_rdp_cliprdr_format_data_request;
^
channels/cliprdr.c:480:39: error: assignment from incompatible pointer type [-Werror]
cliprdr->ServerFormatDataResponse = guac_rdp_cliprdr_format_data_response;
^
cc1: all warnings being treated as errors
This is because FreeRDP commit 65812bd added const to the pointer
argument of each of these handlers, wheras older versions of FreeRDP
lack const here. Our implementations of these functions declare const
and thus do not match the older prototype, though they are compatible
with it.
The latter expects color input to be in an intermediate representation
resulting from using ReadColor(), and produces color output which cannot
be used until converted back with WriteColor().
Though deferred creation of buffers is already intended, creation was
not actually being deferred in practice as the act of initializing the
buffer with a solid rect of color was causing the buffer to be realized,
even if that initialization process is the only drawing operation that
will ever occur to that buffer.