summaryrefslogtreecommitdiffstats
path: root/server/Sample
diff options
context:
space:
mode:
Diffstat (limited to 'server/Sample')
-rw-r--r--server/Sample/CMakeLists.txt24
-rw-r--r--server/Sample/sfreerdp.c10
2 files changed, 8 insertions, 26 deletions
diff --git a/server/Sample/CMakeLists.txt b/server/Sample/CMakeLists.txt
index e23f65c..9a59d8b 100644
--- a/server/Sample/CMakeLists.txt
+++ b/server/Sample/CMakeLists.txt
@@ -32,22 +32,6 @@ if (CHANNEL_AINPUT_SERVER)
list(APPEND SRCS sf_ainput.c sf_ainput.h)
endif()
- # On windows create dll version information.
-# Vendor, product and year are already set in top level CMakeLists.txt
-if (WIN32)
- set (RC_VERSION_MAJOR ${FREERDP_VERSION_MAJOR})
- set (RC_VERSION_MINOR ${FREERDP_VERSION_MINOR})
- set (RC_VERSION_BUILD ${FREERDP_VERSION_REVISION})
- set (RC_VERSION_FILE "${MODULE_NAME}${CMAKE_EXECUTABLE_SUFFIX}" )
-
- configure_file(
- ${PROJECT_SOURCE_DIR}/cmake/WindowsDLLVersion.rc.in
- ${CMAKE_CURRENT_BINARY_DIR}/version.rc
- @ONLY)
-
- set ( SRCS ${SRCS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
-endif()
-
if (WITH_BINARY_VERSIONING)
set(SAMPLE_RESOURCE_ROOT ${CMAKE_INSTALL_FULL_DATAROOTDIR}/FreeRDP${FREERDP_VERSION_MAJOR}/images)
else()
@@ -65,10 +49,7 @@ install(FILES ${SAMPLE_ICONS} DESTINATION ${SAMPLE_RESOURCE_ROOT})
# We need this in runtime path for TestConnect
file(COPY test_icon.bmp DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-add_executable(${MODULE_NAME} ${SRCS})
-if (WITH_BINARY_VERSIONING)
- set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "${MODULE_NAME}${FREERDP_API_VERSION}")
-endif()
+AddTargetWithResourceFile(${MODULE_NAME} TRUE "${FREERDP_VERSION}" SRCS)
target_compile_definitions(${MODULE_NAME}
PRIVATE
@@ -79,8 +60,5 @@ list(APPEND LIBS winpr freerdp)
target_link_libraries(${MODULE_NAME} ${LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT server)
-if (WITH_DEBUG_SYMBOLS AND MSVC)
- install(FILES ${CMAKE_PDB_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT symbols)
-endif()
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Sample")
diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c
index f39a747..fbdd1c3 100644
--- a/server/Sample/sfreerdp.c
+++ b/server/Sample/sfreerdp.c
@@ -537,6 +537,7 @@ static BOOL test_sleep_tsdiff(UINT32* old_sec, UINT32* old_usec, UINT32 new_sec,
static BOOL tf_peer_dump_rfx(freerdp_peer* client)
{
+ BOOL rc = FALSE;
wStream* s = NULL;
UINT32 prev_seconds = 0;
UINT32 prev_useconds = 0;
@@ -559,8 +560,9 @@ static BOOL tf_peer_dump_rfx(freerdp_peer* client)
update = client->context->update;
WINPR_ASSERT(update);
- if (!(pcap_rfx = pcap_open(info->test_pcap_file, FALSE)))
- return FALSE;
+ pcap_rfx = pcap_open(info->test_pcap_file, FALSE);
+ if (!pcap_rfx)
+ goto fail;
prev_seconds = prev_useconds = 0;
@@ -589,9 +591,11 @@ static BOOL tf_peer_dump_rfx(freerdp_peer* client)
break;
}
+ rc = TRUE;
+fail:
Stream_Free(s, TRUE);
pcap_close(pcap_rfx);
- return TRUE;
+ return rc;
}
static DWORD WINAPI tf_debug_channel_thread_func(LPVOID arg)