Commit Graph

133 Commits

Author SHA1 Message Date
David Fort
77413f49b2 winpr: rework alignment functions
_align_XXX functions aren't widely available depending on the C runtime. That causes
problems with mingw where we can easily have some runtime mixes (which lead to mysterious
segfaults most of the time). This patch introduce winpr_aligned_XXX functions that will
either use the function available, or use an emulation layer.
2022-05-12 11:36:01 +02:00
akallabeth
ec699f6c75 scanbuild fixes 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
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
akallabeth
b0c4bb5e86 Used proper format string for wide print size_t 2022-01-19 09:24:57 +01:00
Armin Novak
e80c24e837 Fix printer backend reference count 2021-11-18 14:17:25 +01:00
Armin Novak
8c74de191c Fix printer reference count 2021-11-16 08:27:24 +01:00
Armin Novak
239a3872d2 Fixed cups default printer. 2021-11-16 08:27:24 +01:00
Armin Novak
422b684957 Ensure default printer for windows backend. 2021-11-16 08:27:24 +01:00
Armin Novak
46d524cbc7 windows printer cleanup 2021-11-16 08:27:24 +01:00
Alexandru Bagu
3280363b66 fix call to localtime_s 2021-11-02 08:34:23 +01:00
Armin Novak
7d80c74e97 Cleaned up RDPDR channel interhitance
* All channels inheriting from RDPDR_DRIVE base struct
* Add functions to create/free a new device of a type
* Fixed settings array resize code, prevent 0 sizes
2021-10-18 09:21:02 +02:00
Armin Novak
8a74bdb371 Fixed cast warning 2021-07-29 15:09:53 +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
Simon Nivault
c40ca6bc28 Fixed win printer 2021-06-21 11:32:57 +02:00
akallabeth
6b36c6d417
Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
akallabeth
b494a193db Refactored certificate API:
* Proper encapsulation
* known_hosts2 backend extended (storing PEM)
* New backend storing each host certificate in a file
2021-05-11 08:00:18 +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
akallabeth
d0dacf6336
Parse on a copy of the argument string for printer (#6860)
If done on original the wrong backend is loaded on autoreconnect
2021-03-04 15:49:05 +01:00
sss
6574fdf6e4 reverted changes from clang-format 2021-02-25 14:05:40 +01:00
Gluzskiy Alexandr
bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
akallabeth
e2fd9db0b5 Added const to function arguments 2021-02-17 11:29:56 +01:00
akallabeth
c3a1ed780c Use localtime_s on windows 2020-06-22 11:51:38 +02:00
akallabeth
240fdd07b1 Replaced localtime with localtime_r 2020-06-22 11:51:38 +02:00
akallabeth
13906f3ec6 Fixed #6157: Reset cups instance on disconnect. 2020-05-12 08:46:06 +02:00
akallabeth
8e9b0a625b Fixed int overflow in printer_write_setting
Thanks to hac425
2020-05-08 11:04:03 +02:00
akallabeth
6b485b146a Fixed oob read in irp_write and similar 2020-05-06 13:31:57 +02:00
Armin Novak
9a60d2feb0 Fixed cups httpConnectEncrypt deprecation warning. 2020-04-11 09:41:08 +02:00
Armin Novak
436b68e416 Fixed #5895: cast warnings. 2020-02-19 10:21:43 +01:00
Armin Novak
fd968cdf84 Fixed dead store warning. 2019-11-25 10:32:55 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
f01e042211 Code cleanups (strlen, casts, size_t, ...) 2019-10-29 11:58:43 +01:00
Martin Fleisz
9a33a82fb7
Merge pull request #5634 from akallabeth/error_code_update
Added missing error codes.
2019-10-03 08:45:44 +02:00
Armin Novak
0ffcba9350 Fix #5635: Silence double WITH_CUPS definition. 2019-10-02 16:24:12 +02:00
Armin Novak
134da33eb0 Fixed format string. 2019-10-02 16:01:36 +02:00
akallabeth
d5d3ebee60 Fix #5606: Fall back to loading default printer backend. 2019-09-22 16:22:41 +02:00
Armin Novak
88c654ee1d Modified printer backend to allow dynamic backends. 2019-09-06 09:28:29 +02:00
Armin Novak
37ed4bffd0 Fixed conversion warnings.
Range checks and type casts to remove all warnings in printer channel.
2019-02-21 11:43:59 +01:00
Armin Novak
2e5fd8d16b Fixed clang analyzer false positive memory leaks.
Added a justification for each #ifndef __clang_analyzer__
2019-01-29 17:17:30 +01:00
Armin Novak
0dae6933ce Fixed uninitialized return value. 2019-01-29 16:53:30 +01:00
Armin Novak
dd9814df84 Fixed review remarks. 2019-01-29 14:21:58 +01:00
Armin Novak
34c9404c98 Added OpenSSL include path globally. 2018-12-12 15:41:29 +01:00
Armin Novak
31d5a3b0c3 Don't reset configuration and driver name when supplied via command line. 2018-12-12 14:42:50 +01:00
Armin Novak
d13bd66f5a Implemented printer name based backend to remember settings. 2018-12-12 14:36:18 +01:00
Armin Novak
192680a001 Added callback to handle printer custom components in printer backend. 2018-12-12 10:57:53 +01:00
Armin Novak
a744378110 Fixed a warning in printer channel. 2018-09-18 14:45:25 +02:00