Commit Graph

1044 Commits

Author SHA1 Message Date
David Fort
1f08cb9a7d
Drdynvc needs love (#8059)
* winpr: add lock operation on HashTables

* drdynvc: change the listeners array for a hashtable and other micro cleanups

* logonInfo: drop warning that is shown at every connection

Let's avoid this log, we can't do anything if at Microsoft they don't respect
their own specs.

* rdpei: fix terminate of rdpei

* drdynvc: implement the channel list with a hashtable by channelId
2022-07-26 12:53:41 +02:00
fifthdegree
5f3bc5842a nla: use winpr asn1 library 2022-07-26 09:38:53 +02:00
Armin Novak
36c7c0320b Fixed review comments 2022-07-07 17:31:49 +02:00
fifthdegree
2a3c92b4cc spnego: use winpr asn.1 library 2022-07-07 17:31:49 +02:00
Pascal Nowack
43b609cd6c winpr/clipboard: Allow overriding ValidFileNameComponent call
When using the wClipboard API, the connected peer might not be on the
Windows platform, where further filename restriction exists.
As a result, it is currently not possible to use the wClipboard API,
when intending to allow filenames, containing characters like ':'.

So, add a callback to the wClipboardDelegate, which is set to the
ValidFileNameComponent call by default.
This callback can be overridden by the API user, when it is known, that
there is no need to impose very strict filename restrictions.
2022-07-07 07:45:26 +00:00
David Fort
168117e85b winpr: fix encoding of octetString containers and add required functions for SPNego 2022-07-05 15:04:01 +02:00
akallabeth
05b339b0b1 Added strndup replacement 2022-07-04 14:31:08 +02:00
David Fort
bddb71230e winpr asn1: fixes and more features
This patches adds support for octet string containers that are used by SPNego
(a subfield is contained in an octet string record).
It also adds a performance test to test reallocations in asn1 encoder.
It fixes reallocation problems for both chunks and containers.
2022-07-01 09:43:01 +02:00
David Fort
cbda255dcd winpr: add some ASN1 parsing functions
This patch implements ASN1 parsing in WinPR, as we need it in SSPI packages.
2022-07-01 07:51:31 +02:00
akallabeth
7faf18d9dd Updated flags required by [MS-RDPERP] 2022-06-29 11:41:45 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
fifthdegree
c51348a33b fixes 2022-06-21 10:27:17 +02:00
fifthdegree
e66b99f8dc deprecate old hash callback field 2022-06-21 10:27:17 +02:00
fifthdegree
6d3aa52496 set SAM file and hash callback on credential rather than context 2022-06-21 10:27:17 +02:00
fifthdegree
eeece1a027 server-side kerberos (and some fixes) 2022-06-21 10:27:17 +02:00
fifthdegree
1c012b09b8 implement proper SPNEGO negotiation 2022-06-21 10:27:17 +02:00
akallabeth
f25261e271 Unifiy string append functions 2022-06-17 08:41:46 +02:00
Marc-André Moreau
1d5c0be5ec Add settings to load a custom SSPI shared library module 2022-06-01 15:16:12 +02:00
akallabeth
4c452a96c4 Fixed broken #define guards 2022-05-12 11:36:01 +02:00
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
David Fort
a612ca4ba2 winpr: fix unitary test when CreateProcess is CreateProcessW
As the second argument of CreateProcessW is modified to split with spaces and so
this can not be a const arg.
2022-05-05 13:11:18 +02:00
akallabeth
6ce3499e13
Settings getter tests (#7869)
* Added tests for freerdp_[static|dynamic]_collection_* functions

* Added settings unit test for clone functions

* Fix argument for winpr_RAND and winpr_RAND_pseudo

Using void* eliminates all assumptions of which type the buffer is.
This eliminates unnecessary warnings.
2022-05-02 11:39:38 +02:00
akallabeth
9330559d24 Defined and use _write 2022-04-29 14:27:44 +02:00
akallabeth
00b00ea521 Added unwind.h support 2022-04-29 14:27:44 +02:00
akallabeth
860f44f762 CMake check_include and struct cleanup
Move to WinPR what should be there.
2022-04-29 14:27:44 +02:00
akallabeth
d63817640f Fixed ArrayList_SetItem, return success 2022-04-28 12:37:19 +02:00
akallabeth
2dfc1ddb12 Removed obsolete trio 2022-04-28 10:49:09 +02:00
akallabeth
667b471686 Fixed cast-quality warnings 2022-04-28 09:17:20 +02:00
Armin Novak
2dc98adb62 Updated _wcschr and _wcsrchr to match MSDN spec 2022-04-27 19:42:04 +02:00
Armin Novak
5482607b15 Added Stream_PointerAs
This macro allows retrieving the stream pointer casted to correct
type.
2022-04-27 19:42:04 +02:00
Armin Novak
08035be41b Added missing WINPR_API 2022-04-25 16:06:34 +02:00
akallabeth
74c1a006e9 Fixed format string for Stream_CheckAndLogRequiredLength
__LINE__ requires %d and not %PRIuz
2022-04-23 10:10:09 +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
David Fort
f232562d8b smartcard: take in account the module path for listing smartcards
The PKCS1 module was taken only for the kerberos part.
Also make as exported the winpr_NCryptOpenStorageProviderEx function.
2022-04-15 09:06:09 +02:00
akallabeth
47bd162065 Added function sspi_SetAuthIdentityW 2022-03-28 15:52:59 +02:00
akallabeth
905609381f Unified sspi_FreeAuthIdentity 2022-03-28 15:52:59 +02:00
Zhengyi Fu
e62aaff319 winpr: add GetFileInformationByHandle 2022-03-24 13:40:31 +01:00
Mike Gabriel
d337ea9c16 winpr/{libwinpr/thread/thread.c,include/winpr/thread.h}: Keep DumpThreadHandles as a symbol even if WITH_DEBUG_THREADS is OFF. 2022-03-08 09:16:10 +01:00
Armin Novak
d1f8c00f7b Fixed duplicated symbols 2022-03-03 11:26:48 +01:00
Armin Novak
6ed50b4b1d Refactored WinPR includes 2022-03-03 11:26:48 +01:00
Armin Novak
001c505572 Const corrected function sspi_CopyAuthIdentity 2022-02-24 14:48:46 +01:00
Armin Novak
f4572b082a Use typedef struct definition for sspi types 2022-02-24 08:52:25 +01:00
David Fort
0435b5a65d Implement smartcard logon 2022-02-24 08:52:25 +01:00
David Fort
310f2047bf fix build with mingw 7 2022-02-24 08:52:25 +01:00
Armin Novak
99d63ea89e Fixed missing static and WINPR_API 2022-02-24 08:52:25 +01:00
David Fort
cb351a099d Enable smartcard NLA logon 2022-02-24 08:52:25 +01:00
David Fort
a563a6836b winpr: ncrypt add a property to retrieve the PKCS11 slotId 2022-02-24 08:52:25 +01:00
akallabeth
f568d70d52 Fixed guards 2022-02-18 08:38:28 +01:00
Armin Novak
bf9f1eccc1 Fixed issued with mingw build 2022-02-18 08:38:28 +01:00
Armin Novak
5f8ab14f3f Cleaned up registry value reading, added warnings 2022-02-15 13:43:36 +00: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
77580466ae Removed cached wlog pointer 2022-02-01 11:04:32 +00:00
Armin Novak
1c2bf9f031 Made HRESULT_FROM_WIN32 a static inline 2022-02-01 11:04:32 +00:00
Armin Novak
ccaf3c938c Added Stream_ConstPointer 2022-02-01 10:25:37 +00:00
Armin Novak
10e40147fb Fixed various const warnings 2022-02-01 10:25:37 +00:00
Armin Novak
a40467b3b0 Added Stream_ConstBuffer function 2022-02-01 10:25:37 +00:00
Armin Novak
02896b0656 Fixed warnings from WLOG_ASSERT 2022-02-01 08:48:21 +01:00
Armin Novak
ca30e749e9 Fixed unused-but-set-variable and reserved identifier warnings 2022-02-01 08:48:21 +01:00
Armin Novak
bc08ebc01c Corrected const arguments for wStream functions
Functions only extracting values now use const for wStream argument
2022-01-31 16:13:06 +01:00
Armin Novak
6fc260b285 Fixed integer range warnings, added tests 2022-01-31 16:13:06 +01:00
Armin Novak
d4e557122b Fixed constant definitions
Define signed values instead of raw values
2022-01-31 16:13:06 +01:00
Armin Novak
92c3fd5d59 Fixed unnecessary cast in headers 2022-01-31 16:13:06 +01:00
Armin Novak
0feee85952 Fixed cast warnings due to defines 2022-01-31 16:13:06 +01:00
Armin Novak
03e454d7d0 Fixed missing brace 2022-01-31 15:55:10 +01:00
Armin Novak
e7913b4720 Fixed some reserved names 2022-01-31 15:55:10 +01:00
akallabeth
e6e6ed5dbd Cleaned up PubSub
* Callback arguments now const
* Fixed missing includes
2022-01-19 09:24:57 +01:00
David Fort
130f191392 winpr: fix some string constant in ncrypt and add reader property
Some WCHAR string constant were wrong (missing \x00 at the end).
The commit also implements the NCRYPT_READER_PROPERTY property in the pkcs11 provider.
2022-01-17 16:27:53 +01:00
David Fort
eb53b9913a winpr: interpret the scope paramater in NCryptEnumKeys
Although the official documentation claims that pszScope parameter shall be set to
NULL. In practice setting it to \\.\<reader name>\ allows to filter on the corresponding
reader.
2022-01-17 16:27:53 +01:00
Marc-André Moreau
55be5f8bb0 Fix Windows Unicode handling of environment variables 2022-01-11 12:32:14 +01:00
David Fort
599bc18f33 winpr: fix bcrypt.h string constants 2022-01-10 11:02:45 +01:00
David Fort
bfe8b464be winpr: fix and enhance ncrypt
This patch adds the NCryptEnumStorageProviders function.
It also fixes strings bugs with the compiler taking the WCHAR "Micro" string
M\x00i\x00c\x00r\x00o\x00 as
M\x00i\x0c\x00r\x00o\x00, and so generating unexpected behaviours. The solution is
to split string constants when you hit a character that is a valid hex number, so
that the compiler doesn't interpret i\x00c\x00 (ic in WCHARs) as i\x0c\x00 (weird
string).
2022-01-10 11:02:45 +01:00
Armin Novak
98348ef62a Removed ndr.h from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
ed9cc8c1cc Removed heap module from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
4f0f8e9f8c Removed credentials module from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
5365b2f5f0 Removed midl.c|h from WinPR 2021-12-23 14:27:12 +01:00
Armin Novak
3de6af34ed Removed unused module winhttp 2021-12-23 14:27:12 +01:00
Armin Novak
379aeed24e Removed unimplemented credui module 2021-12-23 14:27:12 +01:00
Armin Novak
a713d5417e Remove unimplemented wnd module 2021-12-23 14:27:12 +01:00
Armin Novak
b30f8886b2 Fixed LinkedList const correctness 2021-12-15 13:36:15 +01:00
David Fort
d4020e2328 winpr: implement ncrypt API
This implements the emulation for the ncrypt API and more specifically the smartcard
provider so that we can list available keys and certificates using pkcs11-helper.
2021-12-14 14:12:01 +01:00
David Fort
a6cadd6f97 winpr: fix compilation for mingw
Depending on the version of mingw some export macro aren't always defined.
2021-12-14 14:12:01 +01:00
akallabeth
d1adfd5ecc Fixed check for TARGET_OS_IPHONE and TARGET_OS_WATCH 2021-11-25 12:25:18 +01:00
David Fort
67986ea298 Fix compilation with mingw
This patch addresses some issues when compiling against mingw. With these changes
FreeRDP can be compiled out-of-the box on a Ubuntu 20.04.
2021-11-15 09:23:16 +01:00
Armin Novak
68eb6e4afc Drop ASN1 module stub
Not implemented, just creates confusion.
2021-11-02 15:13:20 +01:00
Armin Novak
319b0e1b7e Queue_Enqueue const argument
By default use const for the object enqueued.
If a `fnObjectNew` function is set, it is copied anyway.
For the case without cast away the const internally.
2021-10-18 16:09:13 +02:00
akallabeth
3ccb96d52f Fixed #7350: Warnings with Stream_StaticInit
* Properly initialize the stream buffer
* Add Stream_StaticConstInit accepting a const buffer
* Modify API to return a pointer to the stream initialized
2021-10-14 12:11:16 +02:00
Armin Novak
439ec62cff Hide implementation of certain stream functions 2021-10-06 09:49:07 +02:00
Armin Novak
18a3fcf2fc Updated wStream API and added torough checks
* Do length/capacity checks in every read/write/seek function
  if WINPR_ASSERT is defined.
* Ensure s->pointer is valid, e.g. within s->buffer + s->capacity
  (Stream_Rewind, Stream_Seek, ...)
* Add return values to Stream_Set* functions so inalid arguments
  can be reported to the caller
* Deprecated problematic stream manipulation functions
  (Stream_SetBuffer, Stream_SetPointer, Stream_SetCapacity)
* Ensure length/capacity functions never return a value larger
  than the actual length/capacity
2021-10-06 09:49:07 +02:00
akallabeth
cb5ccec212 Cleaned up some possible race conditions with threads
* ExitThread no longer NORETURN, this eases handling of threads.
* Fixed a (rare) race condition when starting a thread
* Made global thread_list optional (you lose the exit code from
  ExitThread)
2021-09-20 10:59:59 +02:00
akallabeth
76979a47fb Added new CMake option to dump event handles in use 2021-09-20 10:59:59 +02:00
akallabeth
d80b418bbc Added object copy support to queue
* Added object copy support to Queue_Enqueue
* Added Queue_Discard to clear the top of the queue
* Added some doxygen for queue functions.
2021-09-20 10:59:59 +02:00
Armin Novak
0fe1e2359e Fixed all reserved-id-macro warnings 2021-09-10 08:16:25 +02:00
Armin Novak
ba0da04217 Fixed compilation warnings and duplicate defines 2021-09-09 08:53:20 +02:00
Armin Novak
9f0eff604e Silence GCC reserved-id-macro warnings in compatibility header 2021-09-09 08:53:20 +02:00
Armin Novak
0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
Armin Novak
fbae9ba88c Added LoadLibraryX and LoadLibraryExX
These functions take a UTF8 string and load a library with
LoadLibraryW under windows.
2021-09-03 08:29:15 +02:00
Armin Novak
737f5a2036 Fixed argument const correctness 2021-08-27 13:21:02 +02:00
akallabeth
f1bde376b1
Raw channel send (#7255)
* Added raw channel data write function

* Use nego_set_state

* Added ArrayList_ForEachAP

* Provide va_copy for older VS compilers
2021-08-26 16:17:51 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak
cbb06a7c17 Fixed DsParse implementations and tests
* Implemented DsMakeSpnW
* Removed unimplemented DsCrackSpnA and DsCrackSpnW
2021-08-24 10:45:57 +02:00
Armin Novak
af0ce13d8a Removed not implemented module 2021-08-24 10:45:57 +02:00
Fabrice Fontaine
0976cce458 winpr/include/winpr/file.h: fix build on uclibc
Include stdio.h to fix the following build failure with uclibc raised
since version 2.4.0 and
eb6777ea69:

In file included from /tmp/instance-0/output-1/build/freerdp-2.4.0/winpr/libwinpr/utils/lodepng/lodepng.c:30:
/tmp/instance-0/output-1/build/freerdp-2.4.0/winpr/include/winpr/file.h:524:11: error: unknown type name 'FILE'
 WINPR_API FILE* winpr_fopen(const char* path, const char* mode);
           ^~~~

Fixes:
 - http://autobuild.buildroot.org/results/31e770a330158035e24b7b952bec0030138482b7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-08-01 09:37:24 +02:00
akallabeth
534d30beb3
No deprecated (#7107)
* Removed cmake options disabling compiler warnings

* Added deprecation compile options

* Fixed android client use of deprecated symbols

* Removed obsolete callback
2021-06-22 14:39:10 +02:00
akallabeth
b453d5e40e Fixed rdtk, uwac and winpr standalone builds 2021-06-22 08:54:18 +02:00
Armin Novak
09cf11ecf0 WinPR: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
Armin Novak
2e0d1cc33c Fixed integer warnings, fixed data types 2021-06-17 10:35:22 +02:00
Armin Novak
299c962b28 Fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak
d9a8083ddf Added WINPR_NORETURN, fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak
1af7ef2f1b Fixed compilation warnings and typos 2021-06-16 15:21:56 +02:00
Armin Novak
9e94f1dace Improve WINPR_ASSERT, log backtrace 2021-06-16 14:26:06 +02:00
Armin Novak
f5bb6d12fc Fixed compilation warnings 2021-06-16 14:26:06 +02:00
Armin Novak
1b3adfae0a Added WINPR_ASSERT to Stream and StreamPool 2021-06-16 14:26:06 +02:00
Armin Novak
d7f3ce0acd Added callback deprecation attribute 2021-06-16 14:26:06 +02:00
Armin Novak
bca7bcd8b0 Cleaned up Queue API, use WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak
b9a9f50dd2 Hide HashTable_SetupForStringData implementation 2021-06-16 11:46:42 +02:00
Armin Novak
30776358bb Readded ArrayList_Add and HashTable_Add as deprecated 2021-06-16 11:46:42 +02:00
Armin Novak
96eca171e2 Removed const from HashTable_ForEach function 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
880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00
Armin Novak
cb642699c8 Modified HashTable API to be opaque
* Reuse wObject function pointers
* Add missing getters/setters
* Clean up return types, const correctness of arguments
2021-06-16 11:46:42 +02:00
akallabeth
3a75228242 Added option do disable WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Armin Novak
b435e6db9b Added WINPR_ASSERT
Added a WinPR macro that can be used for WinPR and FreeRDP to
replace standard C assert.
It is more verbose and logs issues to WLog which makes it easier
for us to trace problems in the field.
2021-06-14 09:37:07 +02:00
Marc-André Moreau
96f07ea993 Windows ARM64 build fixes 2021-06-01 14:18:01 +02:00
Marc-André Moreau
73a931f941 WinPR: don't warn about thread-local storage on iOS, add comment banning its use for new code 2021-05-28 09:57:15 +02:00
Marc-André Moreau
555944f027 run clang-format 2021-05-26 08:40:29 +02:00
Marc-André Moreau
eb6777ea69 Fix Windows Unicode file path handling issues (+add winpr_fopen wrapper) 2021-05-26 08:40:29 +02:00
Biswapriyo Nath
c0c9eb5908 Check MINGW32 for duplicate type declaration. 2021-05-25 09:41:44 +02:00
Armin Novak
6f2c6625e4 Added FREERDP/WINPR prefix to define GIT_REVISION 2021-05-18 13:37:34 +02:00
David Fort
ab4fe21439 winpr: add a HashTable_Foreach function and associated tests
This useful functions allows to browse all value pairs of a hashtable without
having to allocate some memory for keys and then retrieving each element.
It may also make sense with synchronized hashtables because before you were forced to
HashTable_GetKeys() and then HashTable_GetItemValue() which is locking again for each
element of the table.
2021-05-17 09:29:25 +02:00
akallabeth
ab49694101 Added new RDP file options 2021-05-11 07:59:05 +02:00
akallabeth
d4ae65dbb5 Added version to client log, removed build_date 2021-04-22 14:07:37 +02:00
akallabeth
2ea7ac0c06 Unified bin to hex and hex to bin conversion
* Added new functions in WinPR
* Added unit tests for new functions
* Replaced existing (internal) conversion functions
2021-04-19 10:45:21 +02:00
akallabeth
ef6e4c0570
ADDIN_ARGV cleanup, added camera setting to RDP parser (#6947)
* Added camerastoredirect to RDP parser

* Refactored ADDIN_ARGV handling

* Added ADDIN_ARGV unit tests
2021-04-12 10:38:40 +02:00
David Fort
aeba30a505 winpr: correctly implement APC
This patch implements APC functions and fixes waitable timers with completions.
2021-04-07 08:15:16 +02:00
David Fort
dfbbf3b618 winpr: cleanup polling code
Externalize all the polling logic in a pollset component. This patch prepares the
support of APC and alertable state.
2021-04-07 08:15:16 +02: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
43311130a2 Fixed CodeQL warnings 2021-02-19 11:19:49 +01:00
akallabeth
e2fd9db0b5 Added const to function arguments 2021-02-17 11:29:56 +01:00
Armin Novak
54e02e1642 Use wide char file paths for license 2021-02-04 21:22:21 +01:00
Ondrej Holy
d7566f5f5a
client: Fix exit codes for /help and similar option (#6741)
* client: Fix exit codes for /help and similar option

Currently, non-zero exit code is returned for /version, /buildconfig, /help,
/monitor-list, /kbd-list and /kbd-lang-list command-line options for several
clients. This is against conventions because 0 is usually returned in
such cases. Also, there is potentially another problem that the returned
codes overflow on UNIX systems (where the exit code is a number between 0
and 255). Let's fix the clients to return 0 in the mentioned cases to honor
conventions and 1 for the command-line parsing errors (or -1 for clients
who already use that value).

Fixes: https://github.com/FreeRDP/FreeRDP/issues/6686

* Refactored freerdp_client_settings_command_line_status_print_ex

Now returns 0 if help or version information was requested.

* Do not eliminate original error status.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2021-01-22 09:44:55 +01:00
akallabeth
66dc4cc9ee Fixed compilation warnings. 2020-11-10 08:53:43 +01:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Martin Fleisz
b5fa928311 core: Fix race when deleting channel manager
This PR fixes a possible crash when the channel manager was freed and
there were pending messages in the message queue.
The problem was that even though the message queue already received the
WMQ_QUIT message, it was still possible to enqueue messages after this
point. This resulted in unprocessed messages in the queue when it was
deleted. The delete handler then called into channel handlers which
where aleady freed/deleted.
With this PR adding messages after WMQ_QUIT was posted to the message
queue returns an error and all channel messages are now processed before
the channels are closed/terminated.
2020-11-03 17:08:58 +01:00
akallabeth
516fc9b910 Fixed locking issue, removed broken functions 2020-11-02 09:23:11 +01:00
akallabeth
5133c4e424 Corrected name for FD_WRITESTIME 2020-10-15 08:33:14 +02:00
Armin Novak
a22f264189 Added backward compatibility define 2020-10-14 09:19:57 +02:00
Armin Novak
ef1c8a3b50 Updated FD_FLAGS definition. 2020-10-14 09:19:00 +02:00
akallabeth
33df98f204 Fixed definition of FILEDESCRIPTORW 2020-09-22 13:03:55 +02:00