fix [client channels]: move exported API calls to client/common

The functions mappedGeometryRef and mappedGeometryUnref are API
functions ([1]) but were implemented in the geometry channel.
In case FreeRDP was built with BUILTIN_CHANNELS=OFF those functions
weren't available globally but used by the video channel.

Now the functions are fixed part of the freerdp-client library and
therefore available for all channels.

[1] exported in freerdp/client/geometry.h

Fixes #6236
This commit is contained in:
Bernhard Miklautz
2020-06-16 16:35:36 +02:00
committed by akallabeth
parent a0835d2468
commit 1628939227
3 changed files with 44 additions and 19 deletions

View File

@@ -27,7 +27,6 @@
#include <winpr/crt.h>
#include <winpr/synch.h>
#include <winpr/interlocked.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <winpr/cmdline.h>
@@ -82,23 +81,6 @@ static BOOL mappedGeometryKeyCompare(UINT64* g1, UINT64* g2)
return *g1 == *g2;
}
void mappedGeometryRef(MAPPED_GEOMETRY* g)
{
InterlockedIncrement(&g->refCounter);
}
void mappedGeometryUnref(MAPPED_GEOMETRY* g)
{
if (InterlockedDecrement(&g->refCounter))
return;
g->MappedGeometryUpdate = NULL;
g->MappedGeometryClear = NULL;
g->custom = NULL;
free(g->geometry.rects);
free(g);
}
static void freerdp_rgndata_reset(FREERDP_RGNDATA* data)
{
data->nRectCount = 0;