Commit Graph

233 Commits

Author SHA1 Message Date
akallabeth 239cd9212e [channels] fix static linking of common libraries 2023-05-12 08:03:56 +02:00
akallabeth 2b3c8c47a4 [build] fix install with BUILD_SHARED_LIBS=OFF
generate proper CMake targets so static linking works again.
2023-05-12 08:03:56 +02:00
Armin Novak 3d8cb485f4 [warnings] Fixed strict-prototypes warnings 2023-03-06 10:04:59 +01:00
akallabeth 273bb6a7a8 [build] use static libraries as intermediate 2023-03-01 08:18:34 +01:00
akallabeth c054666311 [channels] simplified channel subsystem linking 2023-03-01 08:18:34 +01:00
akallabeth c3a82daad6 [channels] simplified client linking 2023-03-01 08:18:34 +01:00
akallabeth 0307482506 [channels,rdpsnd] add rdpsnd-common object lib 2023-03-01 08:18:34 +01:00
Armin Novak 641022b795 [logging] remove __FUNCTION__ from actual message
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth 075506f6c8 [winpr,stream] use new Stream_CheckAndLogRequiredLength* 2023-01-25 14:27:32 +01:00
akallabeth 8ed37e68d2 [stream] use logging capacity checks 2023-01-25 14:27:32 +01:00
Armin Novak 25b00bc483 [channel,urbdrc] fix type of usb hotplug callback
The libusb_hotplug_callback_fn uses LIBUSB_CALL call type
2022-12-07 11:32:59 +01:00
akallabeth 5799fb2018 Replace ConvertFromUnicode and ConvertToUnicode
* Use new ConvertUtf8ToWChar, ConvertUtf8NToWChar,
  ConvertUtf8ToWCharAlloc and ConvertUtf8NToWCharAlloc
* Use new ConvertWCharToUtf8, ConvertWCharNToUtf8,
  ConvertWCharToUtf8Alloc and ConvertWCharNToUtf8Alloc
* Use new Stream UTF16 to/from UTF8 read/write functions
* Use new settings UTF16 to/from UTF8 read/write functions
2022-11-28 10:42:36 +01:00
Armin Novak 476bed5731 Fixed -Wconditional-uninitialized 2022-11-21 10:12:31 +01:00
akallabeth d9e687d7e1 Added missing length check in urb_control_transfer 2022-11-14 09:28:22 +01:00
akallabeth b366ff19a5 Fixed missing input buffer length check in urbdrc 2022-11-14 09:28:22 +01:00
akallabeth 49bd22aea7 Ensure urb_create_iocompletion uses size_t for calculation 2022-11-14 09:28:22 +01:00
akallabeth b54ca508ac Fixed division by zero in urbdrc 2022-11-14 09:28:22 +01:00
akallabeth 1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
akallabeth bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth f25261e271 Unifiy string append functions 2022-06-17 08:41:46 +02:00
David Fort e389210673 client channels: mutualize common types between dynamic channels
Most dynamic channels share the same copied and pasted code for the XXX_CHANNEL_CALLBACK
and XXX_LISTENER_CALLBACK types. This patch introduce GENERIC_CHANNEL_CALLBACK and
GENERIC_LISTENER_CALLBACK that fits for most channels and discard custom type definitions.
2022-06-15 14:04:58 +02:00
akallabeth dc6c54af49 Fixed missing WINAPI for callback function declarations 2022-05-25 10:31:21 +02:00
akallabeth 962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
akallabeth 1dcc5a180a Fixed warnings 2022-04-28 11:24:51 +02:00
akallabeth 73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
Armin Novak 4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak fd027d1bf0 Removed BUILTIN_CHANNELS
Building client channels out of tree does not work reliable as the
dependencies can not be easily split. (exceptions may be simple ones
as echo channel)
It does complicate the build system and code though, so remove this
for maintainability reasons.
2022-02-23 10:43:46 +01:00
Armin Novak bf9f1eccc1 Fixed issued with mingw build 2022-02-18 08:38:28 +01:00
akallabeth 8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak ed73cf0d17 Added libusb transfer cancel hack 2021-11-29 09:30:10 +01:00
Armin Novak bae23de82f Fixed issues with libusb device unref 2021-11-29 09:30:10 +01:00
Alexandru Bagu 21ca4a009d
Urbrdc fix (#7417)
* fix libusb libusb_device usage (manually unref required usb devices, versus freeing all when we still hold references to the ones we want)
* disabled detach_kernel_driver & attach_kernel_driver on win32 since libusb does not support them
* fixed libusb async event handling

* add log for transfer request error

* Update libusb_udevice.c

* refactor code
2021-11-03 11:11:36 +01:00
Armin Novak 96cf17a45b Replaced (IWTSPlugin*) casts with struct address return 2021-10-07 16:22:04 +02:00
akallabeth 7b7e2d6f32 Prefer constant division over multiplication for length checks 2021-09-21 08:55:22 +02:00
Armin Novak 673fb46836 Fixed uninitialized warnings 2021-09-10 08:16:25 +02:00
Armin Novak 0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
Armin Novak f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Armin Novak 610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak 34413d9480 Fix data write on usb channel 2021-06-23 12:05:11 +02:00
Armin Novak 8ef57bf296 Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
Armin Novak 0355bbc51f Added missing log mapping for TRANSFER_OUT_REQUEST 2021-06-21 13:27:39 +02:00
Armin Novak ccfe0c129e Removed checks already done by WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak a1c8e4cf85 Refactored ArrayList_Add to conform to other functions 2021-06-16 11:46:42 +02:00
Armin Novak d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Armin Novak 51919af2d6 Add more information to urbdrc log entries 2021-05-28 09:39:34 +02:00
akallabeth 566f47f63b Fixed compilation warnings. 2021-05-11 08:32:18 +02:00
akallabeth ab49694101 Added new RDP file options 2021-05-11 07:59:05 +02:00
Ondrej Holy 892cbe3261 Fix various memory leaks reported by Coverity
Covscan report contains various memory leak defects which were marked
as important. I have spent some time analyzing them and although they
were marked as important, most of them are in error cases, so probably
nothing serious. Let's fix most of them anyway. The rest are false
positives, or too complicated to fix, or already fixed in master, or
simply I am unsure about them.

Relates: https://github.com/FreeRDP/FreeRDP/issues/6981
2021-04-27 14:25:20 +02:00