Revert to git commit 24a752a to reduce the amount of API breakage

This commit is contained in:
David Woodhouse 2015-03-17 14:00:34 +00:00
parent 1f291fa155
commit d347a8c916
7 changed files with 602 additions and 8 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
/1.2.0-beta1+android7.tar.gz
/1.2.0-beta1+20150313.tar.gz
/FreeRDP-6ac718010a7fb330618c559345766c67267b6aa3.tar.gz
/FreeRDP-24a752a70840f3e4b027ba7c020af71f2bcfd94a.tar.gz

View File

@ -1,17 +1,17 @@
diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake
index 282659e..6045e31 100644
index 87ffefe..7eacca5 100644
--- a/cmake/ConfigOptions.cmake
+++ b/cmake/ConfigOptions.cmake
@@ -7,6 +7,8 @@ elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") AND (CMAKE_SIZEOF_VOID_P
@@ -6,6 +6,8 @@ elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") AND (CMAKE_SIZEOF_VOID_P
elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "i386") AND (CMAKE_SIZEOF_VOID_P EQUAL 8) AND (APPLE))
# Mac is weird like that.
set(TARGET_ARCH "x64")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
+ set(TARGET_ARCH "AARCH64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm*")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
set(TARGET_ARCH "ARM")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
@@ -23,6 +25,9 @@ else()
endif()
@@ -20,6 +22,9 @@ else()
option(WITH_SSE2 "Enable SSE2 optimization." OFF)
endif()

186
freerdp-args.patch Normal file
View File

@ -0,0 +1,186 @@
diff --git a/client/common/cmdline.c b/client/common/cmdline.c
index f1f9640..72bbd12 100644
--- a/client/common/cmdline.c
+++ b/client/common/cmdline.c
@@ -1078,8 +1078,10 @@ BOOL freerdp_client_detect_command_line(int argc, char** argv, DWORD* flags)
if (posix_cli_status <= COMMAND_LINE_STATUS_PRINT)
return compatibility;
- if (windows_cli_count >= posix_cli_count)
+ /* Check, if this may be windows style syntax... */
+ if ((windows_cli_count && (windows_cli_count >= posix_cli_count)) || (windows_cli_status <= COMMAND_LINE_STATUS_PRINT))
{
+ windows_cli_count = 1;
*flags = COMMAND_LINE_SEPARATOR_COLON;
*flags |= COMMAND_LINE_SIGIL_SLASH | COMMAND_LINE_SIGIL_PLUS_MINUS;
}
diff --git a/client/common/compatibility.c b/client/common/compatibility.c
index 3a7d0da..d6efe50 100644
--- a/client/common/compatibility.c
+++ b/client/common/compatibility.c
@@ -122,16 +122,20 @@ void freerdp_client_old_parse_hostname(char* str, char** ServerHostname, UINT32*
int freerdp_client_old_process_plugin(rdpSettings* settings, ADDIN_ARGV* args)
{
+ int args_handled = 0;
if (strcmp(args->argv[0], "cliprdr") == 0)
{
+ args_handled++;
settings->RedirectClipboard = TRUE;
WLog_WARN(TAG, "--plugin cliprdr -> +clipboard");
}
else if (strcmp(args->argv[0], "rdpdr") == 0)
{
+ args_handled++;
if (args->argc < 2)
- return -1;
+ return 1;
+ args_handled++;
if ((strcmp(args->argv[1], "disk") == 0) ||
(strcmp(args->argv[1], "drive") == 0))
{
@@ -159,21 +163,26 @@ int freerdp_client_old_process_plugin(rdpSettings* settings, ADDIN_ARGV* args)
}
else if (strcmp(args->argv[0], "drdynvc") == 0)
{
+ args_handled++;
freerdp_client_add_dynamic_channel(settings, args->argc - 1, &args->argv[1]);
}
else if (strcmp(args->argv[0], "rdpsnd") == 0)
{
+ args_handled++;
if (args->argc < 2)
- return -1;
+ return 1;
+ args_handled++;
freerdp_addin_replace_argument_value(args, args->argv[1], "sys", args->argv[1]);
freerdp_client_add_static_channel(settings, args->argc, args->argv);
}
else if (strcmp(args->argv[0], "rail") == 0)
{
+ args_handled++;
if (args->argc < 2)
- return -1;
+ return 1;
+ args_handled++;
settings->RemoteApplicationProgram = _strdup(args->argv[1]);
}
else
@@ -181,14 +190,12 @@ int freerdp_client_old_process_plugin(rdpSettings* settings, ADDIN_ARGV* args)
freerdp_client_add_static_channel(settings, args->argc, args->argv);
}
- return 1;
+ return args_handled;
}
int freerdp_client_old_command_line_pre_filter(void* context, int index, int argc, LPCSTR* argv)
{
- rdpSettings* settings;
-
- settings = (rdpSettings*) context;
+ rdpSettings* settings = (rdpSettings*) context;
if (index == (argc - 1))
{
@@ -204,11 +211,10 @@ int freerdp_client_old_command_line_pre_filter(void* context, int index, int arg
return -1;
}
- if (settings)
- {
- freerdp_client_old_parse_hostname((char*) argv[index],
- &settings->ServerHostname, &settings->ServerPort);
- }
+ freerdp_client_old_parse_hostname((char*) argv[index],
+ &settings->ServerHostname, &settings->ServerPort);
+
+ return 2;
}
else
{
@@ -218,6 +224,7 @@ int freerdp_client_old_command_line_pre_filter(void* context, int index, int arg
if (strcmp("--plugin", argv[index]) == 0)
{
+ int args_handled = 0;
int length;
char *a, *p;
int i, j, t;
@@ -233,20 +240,19 @@ int freerdp_client_old_command_line_pre_filter(void* context, int index, int arg
return -1;
args = (ADDIN_ARGV*) malloc(sizeof(ADDIN_ARGV));
- args->argv = (char**) malloc(sizeof(char*) * 5);
+ args->argv = (char**) calloc(argc, sizeof(char*));
args->argc = 1;
- args->argv[0] = _strdup(argv[t]);
-
if ((index < argc - 1) && strcmp("--data", argv[index + 1]) == 0)
{
i = 0;
index += 2;
- args->argc = 1;
while ((index < argc) && (strcmp("--", argv[index]) != 0))
{
+ args_handled ++;
args->argc = 1;
+ args->argv[0] = _strdup(argv[t]);
for (j = 0, p = (char*) argv[index]; (j < 4) && (p != NULL); j++)
{
@@ -267,6 +273,9 @@ int freerdp_client_old_command_line_pre_filter(void* context, int index, int arg
if (p != NULL)
{
p = strchr(p, ':');
+ }
+ if (p != NULL)
+ {
length = (int) (p - a);
args->argv[j + 1] = (char*) malloc(length + 1);
CopyMemory(args->argv[j + 1], a, length);
@@ -281,11 +290,14 @@ int freerdp_client_old_command_line_pre_filter(void* context, int index, int arg
args->argc++;
}
- if (settings->instance)
+ if (settings)
{
freerdp_client_old_process_plugin(settings, args);
}
+ for (i = 0; i < args->argc; i++)
+ free(args->argv[i]);
+ memset(args->argv, 0, argc * sizeof(char*));
index++;
i++;
}
@@ -294,19 +306,16 @@ int freerdp_client_old_command_line_pre_filter(void* context, int index, int arg
{
if (settings)
{
- if (settings->instance)
- {
- freerdp_client_old_process_plugin(settings, args);
- }
+ args->argv[0] = _strdup(argv[t]);
+ args_handled = freerdp_client_old_process_plugin(settings, args);
+ free (args->argv[0]);
}
}
- for (i = 0; i < args->argc; i++)
- free(args->argv[i]);
free(args->argv);
free(args);
- return (index - old_index);
+ return (index - old_index) + args_handled;
}
return 0;

79
freerdp-cmake-list.patch Normal file
View File

@ -0,0 +1,79 @@
diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt
index c4e6048..540b1ac 100644
--- a/channels/CMakeLists.txt
+++ b/channels/CMakeLists.txt
@@ -253,8 +253,8 @@ set(FILENAME "ChannelOptions.cmake")
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
foreach(FILEPATH ${FILEPATHS})
- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" DIR ${FILEPATH})
+ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
+ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" DIR ${FILEPATH})
set(CHANNEL_OPTION)
include(${FILEPATH})
if(${CHANNEL_OPTION})
diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt
index 049bc7b..2db18e8 100644
--- a/channels/client/CMakeLists.txt
+++ b/channels/client/CMakeLists.txt
@@ -24,7 +24,9 @@ set(${MODULE_PREFIX}_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/addin.c
${CMAKE_CURRENT_SOURCE_DIR}/addin.h)
+if(CHANNEL_STATIC_CLIENT_ENTRIES)
list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES)
+endif()
foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 14ed363..b8b7699 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -63,8 +63,8 @@ set(FILENAME "ModuleOptions.cmake")
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
foreach(FILEPATH ${FILEPATHS})
- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH})
+ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
+ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH})
set(FREERDP_CLIENT_ENABLED 0)
include(${FILEPATH})
if(FREERDP_CLIENT_ENABLED)
diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
index 75acf25..f82b6fe 100644
--- a/server/CMakeLists.txt
+++ b/server/CMakeLists.txt
@@ -44,8 +44,8 @@ set(FILENAME "ModuleOptions.cmake")
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
foreach(FILEPATH ${FILEPATHS})
- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH})
+ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
+ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH})
set(FREERDP_SERVER_ENABLED 0)
include(${FILEPATH})
if(FREERDP_SERVER_ENABLED)
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index 09b1fd4..610f35e 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -22,11 +22,11 @@
file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
foreach(dir ${all_valid_subdirs})
- if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
- string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
+ if(${dir} MATCHES "^([^/]*)/+CMakeLists.txt")
+ string(REGEX REPLACE "^([^/]*)/+CMakeLists.txt" "\\1" dir_trimmed ${dir})
message(STATUS "Adding third-party component ${dir_trimmed}")
add_subdirectory(${dir_trimmed})
endif()
endforeach(dir)
-set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)
\ No newline at end of file
+set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)

View File

@ -0,0 +1,313 @@
commit 7c3adc8449a4fe89920a6438206e8e2690d7f021
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:21:04 2014 +0100
Fixed nonnull warning.
commit 232aa89efd13d21b2e5dca69e0aea70a03d09544
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:22:33 2014 +0100
Fixed memory leak.
commit d9b889ddb7e466837e363b45ae6713c0bcf0f6db
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:33:37 2014 +0100
Fixed memory leak.
commit f34ee395eb9516bd1b91e25acc0fa73a574d531d
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:34:17 2014 +0100
Fixed memory leak.
commit c44f85c2b4e5455e5da1609d2b6d1a73a7ea2371
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:42:05 2014 +0100
Fixed memory leak.
commit 7881ec762e6f9b51e24878f4c3ed5343a4e05509
Author: Marc-André Moreau <marcandre.moreau@gmail.com>
Date: Fri Nov 21 15:10:39 2014 -0500
server/shadow: avoid sending pointer updates when not active, fix remdesk leak
commit 547054a48b83fe81917cb3b474116225e97d340f
Author: Armin Novak <armin.novak@gmail.com>
Date: Sun Dec 7 00:23:46 2014 +0100
Fixed uninitialized value.
commit 43beef36ff1521756bc41378cfa251c843375f49
Author: Bernhard Miklautz <bernhard.miklautz@shacknet.at>
Date: Fri Dec 12 18:57:40 2014 +0100
rdtk/shadow: install libraries versioned
diff --git a/channels/remdesk/server/remdesk_main.c b/channels/remdesk/server/remdesk_main.c
index 4a7670e..072eec2 100644
--- a/channels/remdesk/server/remdesk_main.c
+++ b/channels/remdesk/server/remdesk_main.c
@@ -156,6 +156,8 @@ static int remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context)
remdesk_virtual_channel_write(context, s);
+ Stream_Free(s, TRUE);
+
return 1;
}
diff --git a/client/common/cmdline.c b/client/common/cmdline.c
index f1f9640..a731c31 100644
--- a/client/common/cmdline.c
+++ b/client/common/cmdline.c
@@ -2077,11 +2077,24 @@ int freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
}
}
+ if (settings->LyncRdpMode)
+ {
+ settings->EncomspVirtualChannel = TRUE;
+ settings->RemdeskVirtualChannel = TRUE;
+ settings->CompressionEnabled = FALSE;
+ }
+
if (settings->RemoteAssistanceMode)
{
+ settings->EncomspVirtualChannel = TRUE;
+ settings->RemdeskVirtualChannel = TRUE;
+ }
+
+ if (settings->EncomspVirtualChannel)
freerdp_client_load_static_channel_addin(channels, settings, "encomsp", settings);
+
+ if (settings->RemdeskVirtualChannel)
freerdp_client_load_static_channel_addin(channels, settings, "remdesk", settings);
- }
for (index = 0; index < settings->StaticChannelCount; index++)
{
diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h
index a53c14d..ca358f1 100644
--- a/include/freerdp/settings.h
+++ b/include/freerdp/settings.h
@@ -599,6 +599,9 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
#define FreeRDP_RemoteAssistancePassStub 1026
#define FreeRDP_RemoteAssistancePassword 1027
#define FreeRDP_RemoteAssistanceRCTicket 1028
+#define FreeRDP_EncomspVirtualChannel 1029
+#define FreeRDP_RemdeskVirtualChannel 1030
+#define FreeRDP_LyncRdpMode 1031
#define FreeRDP_TlsSecurity 1088
#define FreeRDP_NlaSecurity 1089
#define FreeRDP_RdpSecurity 1090
@@ -971,7 +974,10 @@ struct rdp_settings
ALIGN64 char* RemoteAssistancePassStub; /* 1026 */
ALIGN64 char* RemoteAssistancePassword; /* 1027 */
ALIGN64 char* RemoteAssistanceRCTicket; /* 1028 */
- UINT64 padding1088[1088 - 1029]; /* 1029 */
+ ALIGN64 BOOL EncomspVirtualChannel; /* 1029 */
+ ALIGN64 BOOL RemdeskVirtualChannel; /* 1030 */
+ ALIGN64 BOOL LyncRdpMode; /* 1031 */
+ UINT64 padding1088[1088 - 1032]; /* 1032 */
/**
* X.224 Connection Request/Confirm
diff --git a/rdtk/CMakeLists.txt b/rdtk/CMakeLists.txt
index 35b0052..93c5a3c 100644
--- a/rdtk/CMakeLists.txt
+++ b/rdtk/CMakeLists.txt
@@ -44,8 +44,9 @@ include(CMakePackageConfigHelpers)
set(RDTK_VERSION_MAJOR "1")
set(RDTK_VERSION_MINOR "1")
set(RDTK_VERSION_REVISION "0")
-set(RDTK_VERSION "${RDTK_VERSION_MAJOR}.${RDTK_VERSION_MINOR}")
-set(RDTK_VERSION_FULL "${RDTK_VERSION}.${RDTK_VERSION_REVISION}")
+set(RDTK_API_VERSION "${RDTK_VERSION_MAJOR}.${RDTK_VERSION_MINOR}")
+set(RDTK_VERSION "${RDTK_API_VERSION}.${RDTK_VERSION_REVISION}")
+set(RDTK_VERSION_FULL "${RDTK_VERSION}")
set(RDTK_VERSION_FULL ${RDTK_VERSION_FULL} PARENT_SCOPE)
# Default to release build type
diff --git a/rdtk/librdtk/CMakeLists.txt b/rdtk/librdtk/CMakeLists.txt
index 8a81964..950cc7d 100644
--- a/rdtk/librdtk/CMakeLists.txt
+++ b/rdtk/librdtk/CMakeLists.txt
@@ -58,6 +58,10 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
list(APPEND ${MODULE_PREFIX}_LIBS winpr)
list(APPEND ${MODULE_PREFIX}_LIBS freerdp)
+if (WITH_LIBRARY_VERSIONING)
+ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${RDTK_VERSION} SOVERSION ${RDTK_API_VERSION})
+endif()
+
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT RdTkTargets)
diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt
index 78f85b0..26a5c7b 100644
--- a/server/shadow/CMakeLists.txt
+++ b/server/shadow/CMakeLists.txt
@@ -238,6 +238,10 @@ list(APPEND ${MODULE_PREFIX}_LIBS rdtk)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
+if (WITH_LIBRARY_VERSIONING)
+ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
+endif()
+
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server)
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/shadow")
diff --git a/server/shadow/X11/x11_shadow.c b/server/shadow/X11/x11_shadow.c
index 3f1a964..d1a8591 100644
--- a/server/shadow/X11/x11_shadow.c
+++ b/server/shadow/X11/x11_shadow.c
@@ -386,7 +386,10 @@ int x11_shadow_pointer_alpha_update(x11ShadowSubsystem* subsystem)
msg->pixels = (BYTE*) malloc(msg->scanline * msg->height);
if (!msg->pixels)
+ {
+ free (msg);
return -1;
+ }
CopyMemory(msg->pixels, subsystem->cursorPixels, msg->scanline * msg->height);
msg->premultiplied = TRUE;
diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c
index 63d0b9e..30ab90e 100644
--- a/server/shadow/shadow_client.c
+++ b/server/shadow/shadow_client.c
@@ -67,6 +67,12 @@ void shadow_client_context_new(freerdp_peer* peer, rdpShadowClient* client)
settings->RdpKeyFile = _strdup(settings->PrivateKeyFile);
+ if (server->ipcSocket)
+ {
+ settings->LyncRdpMode = TRUE;
+ settings->CompressionEnabled = FALSE;
+ }
+
client->inLobby = TRUE;
client->mayView = server->mayView;
client->mayInteract = server->mayInteract;
@@ -217,8 +223,12 @@ void shadow_client_refresh_rect(rdpShadowClient* client, BYTE count, RECTANGLE_1
wParam = (SHADOW_MSG_IN_REFRESH_OUTPUT*) calloc(1, sizeof(SHADOW_MSG_IN_REFRESH_OUTPUT));
- if (!wParam)
+ if (!wParam || !areas)
+ {
+ if (wParam)
+ free (wParam);
return;
+ }
wParam->numRects = (UINT32) count;
@@ -227,7 +237,10 @@ void shadow_client_refresh_rect(rdpShadowClient* client, BYTE count, RECTANGLE_1
wParam->rects = (RECTANGLE_16*) calloc(wParam->numRects, sizeof(RECTANGLE_16));
if (!wParam->rects)
+ {
+ free (wParam);
return;
+ }
}
CopyMemory(wParam->rects, areas, wParam->numRects * sizeof(RECTANGLE_16));
@@ -832,12 +845,15 @@ int shadow_client_subsystem_process_message(rdpShadowClient* client, wMessage* m
pointerPosition.xPos = msg->xPos;
pointerPosition.yPos = msg->yPos;
- if ((msg->xPos != client->pointerX) || (msg->yPos != client->pointerY))
+ if (client->activated)
{
- IFCALL(update->pointer->PointerPosition, context, &pointerPosition);
+ if ((msg->xPos != client->pointerX) || (msg->yPos != client->pointerY))
+ {
+ IFCALL(update->pointer->PointerPosition, context, &pointerPosition);
- client->pointerX = msg->xPos;
- client->pointerY = msg->yPos;
+ client->pointerX = msg->xPos;
+ client->pointerY = msg->yPos;
+ }
}
free(msg);
@@ -862,14 +878,17 @@ int shadow_client_subsystem_process_message(rdpShadowClient* client, wMessage* m
pointerCached.cacheIndex = pointerColor->cacheIndex;
- shadow_client_convert_alpha_pointer_data(msg->pixels, msg->premultiplied,
- msg->width, msg->height, pointerColor);
+ if (client->activated)
+ {
+ shadow_client_convert_alpha_pointer_data(msg->pixels, msg->premultiplied,
+ msg->width, msg->height, pointerColor);
- IFCALL(update->pointer->PointerNew, context, &pointerNew);
- IFCALL(update->pointer->PointerCached, context, &pointerCached);
+ IFCALL(update->pointer->PointerNew, context, &pointerNew);
+ IFCALL(update->pointer->PointerCached, context, &pointerCached);
- free(pointerColor->xorMaskData);
- free(pointerColor->andMaskData);
+ free(pointerColor->xorMaskData);
+ free(pointerColor->andMaskData);
+ }
free(msg->pixels);
free(msg);
diff --git a/server/shadow/shadow_encoder.c b/server/shadow/shadow_encoder.c
index 1e200ee..8d449bf 100644
--- a/server/shadow/shadow_encoder.c
+++ b/server/shadow/shadow_encoder.c
@@ -407,7 +407,10 @@ rdpShadowEncoder* shadow_encoder_new(rdpShadowClient* client)
encoder->height = server->screen->height;
if (shadow_encoder_init(encoder) < 0)
+ {
+ free (encoder);
return NULL;
+ }
return encoder;
}
diff --git a/server/shadow/shadow_subsystem.c b/server/shadow/shadow_subsystem.c
index f0ed9b8..ac4fd70 100644
--- a/server/shadow/shadow_subsystem.c
+++ b/server/shadow/shadow_subsystem.c
@@ -93,11 +93,11 @@ int shadow_subsystem_load_entry_points(RDP_SHADOW_ENTRY_POINTS* pEntryPoints, co
entry = shadow_subsystem_load_static_entry(name);
+ ZeroMemory(pEntryPoints, sizeof(RDP_SHADOW_ENTRY_POINTS));
+
if (!entry)
return -1;
- ZeroMemory(pEntryPoints, sizeof(RDP_SHADOW_ENTRY_POINTS));
-
if (entry(pEntryPoints) < 0)
return -1;
diff --git a/server/shadow/shadow_surface.c b/server/shadow/shadow_surface.c
index 9c58142..4c13662 100644
--- a/server/shadow/shadow_surface.c
+++ b/server/shadow/shadow_surface.c
@@ -44,12 +44,19 @@ rdpShadowSurface* shadow_surface_new(rdpShadowServer* server, int x, int y, int
surface->data = (BYTE*) malloc(surface->scanline * surface->height);
if (!surface->data)
+ {
+ free (surface);
return NULL;
+ }
ZeroMemory(surface->data, surface->scanline * surface->height);
if (!InitializeCriticalSectionAndSpinCount(&(surface->lock), 4000))
+ {
+ free (surface->data);
+ free (surface);
return NULL;
+ }
region16_init(&(surface->invalidRegion));

View File

@ -1,10 +1,10 @@
# https://fedoraproject.org/wiki/Packaging:SourceURL#Github
%global commit 6ac718010a7fb330618c559345766c67267b6aa3
%global commit 24a752a70840f3e4b027ba7c020af71f2bcfd94a
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: freerdp
Version: 1.2.1
Release: 0.1%{?shortcommit:.git.%{shortcommit}}%{?dist}
Release: 0.2%{?shortcommit:.git.%{shortcommit}}%{?dist}
Epoch: 1
Summary: Free implementation of the Remote Desktop Protocol (RDP)
@ -13,6 +13,14 @@ URL: http://www.freerdp.com/
# VCS: git:https://github.com/FreeRDP/Remmina.git
Source0: https://github.com/FreeRDP/FreeRDP/archive/%{commit}/FreeRDP-%{commit}.tar.gz
Patch0: freerdp-aarch64.patch
# https://github.com/FreeRDP/FreeRDP/commit/1b663ceffe51008af7ae9749e5b7999b2f7d6698
Patch1: freerdp-cmake-list.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1150349
# https://github.com/FreeRDP/FreeRDP/pull/2310
Patch2: freerdp-args.patch
# We have to stick at commit 24a752a for now to stop breaking guacamole etc.,
# and these are assorted shadow fixes from later.
Patch3: freerdp-fixes-since-24a752a.patch
BuildRequires: alsa-lib-devel
BuildRequires: cmake >= 2.8
@ -99,6 +107,9 @@ developing applications that use %{name}-libwinpr.
%prep
%setup -qn FreeRDP-%{commit}
%patch0 -p1 -b .aarch64
%patch1 -p1 -b .cmake-list
%patch2 -p1 -b .args
%patch3 -p1 -b .fixes
# Rpmlint fixes
find . -name "*.h" -exec chmod 664 {} \;
@ -119,6 +130,7 @@ find . -name "*.h" -exec chmod 664 {} \;
-DWITH_PCSC=ON \
-DWITH_PULSE=ON \
-DWITH_SERVER=ON \
-DWITH_WAYLAND=OFF \
-DWITH_X11=ON \
-DWITH_XCURSOR=ON \
-DWITH_XEXT=ON \
@ -200,6 +212,9 @@ find %{buildroot} -name "*.a" -delete
%{_libdir}/pkgconfig/winpr.pc
%changelog
* Tue Mar 17 2015 David Woodhouse <dwmw2@infradead.org> - 1:1.2.1-0.2.git.24a752a
- Revert to an older snapshot (+fixes) to fix guacamole-server build failure
* Fri Mar 13 2015 Simone Caronni <negativo17@gmail.com> - 1:1.2.1-0.1.git.6ac7180
- Use packaging guidelines for Github snapshots.
- Version is now at 1.2.1-dev.

View File

@ -1 +1 @@
ea719acbd6833c74c88682c13211391a FreeRDP-6ac718010a7fb330618c559345766c67267b6aa3.tar.gz
2b498c41d265d5cb2fcc25420d0a050e FreeRDP-24a752a70840f3e4b027ba7c020af71f2bcfd94a.tar.gz