Commit Graph

724 Commits

Author SHA1 Message Date
akallabeth
c25d15d1d6 Initialize WLog prefix string buffers '\0' 2022-02-28 16:49:18 +01:00
akallabeth
861eaa693b Removed windows debug console 4096 character limit 2022-02-28 16:49:18 +01:00
Armin Novak
6e2c5f2273 Added CommandLineParseCommaSeparatedValuesEx single quote support 2022-02-24 10:58:26 +01:00
Armin Novak
ceaff16f8c Added quoted argument support to CommandLineParseCommaSeparatedValuesEx
* Argument quoting support
* Empty list element detection
* Unit test for argument parser
2022-02-24 08:26:30 +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
10e40147fb Fixed various const warnings 2022-02-01 10:25:37 +00: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
akallabeth
a337031b24
Cache Emulate_IsConfigured result (#7569)
* Cache Emulate_IsConfigured result

The check is used very often, so this caching reduces necessary
allocations.

* Fix winpr_HexLogDump

Abort function early if the log message is to be discarded due to
the log level being inactive.

* Use common logger for rdpdr message

Co-authored-by: Martin Fleisz <martin.fleisz@thincast.com>
2022-01-21 13:24:20 +01:00
akallabeth
e6e6ed5dbd Cleaned up PubSub
* Callback arguments now const
* Fixed missing includes
2022-01-19 09:24:57 +01:00
akallabeth
1326134cdf Fixed warnings in BufferPool 2022-01-19 09:24:57 +01:00
Armin Novak
339cdded45 Fixed memory sanitizer warnings 2022-01-11 14:32:18 +01:00
Armin Novak
b30f8886b2 Fixed LinkedList const correctness 2021-12-15 13:36:15 +01:00
akallabeth
6ee60ea15a Fixed various warnings 2021-11-30 08:20:19 +01:00
akallabeth
a3af2c0bdc Fix duplicate MIN macro definition 2021-11-25 12:25:18 +01:00
Ondrej Holy
365c9f6319 winpr/ssl: Fix capitalization in log messages
The log messages contained the `ENabled` string, which looks weird to me.
Let's change that to `enabled`.
2021-11-18 14:17:12 +01:00
Ondrej Holy
b90ccfa13f winpr/ssl: Call the winpr_enable_fips function only once
The `winpr_enable_fips`	function is called twice from the `winpr_InitializeSSL`
function after commit 49936a7b. I believe this is a bug, which might lead to
some undesired behavior. Let's call that only once.
2021-11-18 14:17:12 +01:00
Ondrej Holy
2d0b58759b winpr/ssl: Load legacy provider when initializing OpenSSL 3.0
With OpenSSL 3.O, FreeRDP log contains errors like:

```
4036740A4C7F0000:error:0308010C:digital envelope routines:
inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:346:
Global default library context, Algorithm (MD4 : 85), Properties ()
```

This leads to connection failures in some cases. This is because algorithms
like MD4 are now part of the legacy provider, which is not loaded by
default. Let's explicitly load that provider. With this change, also the
other provides has to be explicitely loaded.
2021-11-18 14:17:12 +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
fb924c6bbc Fixed struct alignment 2021-10-18 16:09:13 +02: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
Armin Novak
e362a59aa5 Fixed const correctness of variable 2021-10-14 13:04:59 +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
akallabeth
6ac4cad8dd
Settings fixes (#7335)
* Fix temporary settings allocation for command line

Detection of legacy command line requires a temporary settings
struct. This was previously manyally allocated instead of using
freerdp_settings_new and freerdp_settings_free.

* Fixed CommandLineParseCommaSeparatedValuesEx

The name argument was not copied into the returned array.
2021-10-07 13:43:12 +02:00
Armin Novak
439ec62cff Hide implementation of certain stream functions 2021-10-06 09:49:07 +02:00
Armin Novak
983443749d Added Stream_EnsureValidity
This function  terminates a process if a stream was used incorrectly.
It will work similar to an assert, but it is not possible to compile
without this.

Purpose is to prevent problems with missing length/capacity checks
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
1ca7e1f7a0 Added option to disable graphics decoding in client code path 2021-09-20 10:59:59 +02:00
akallabeth
b69156d79c Eliminated spammy log messages from backtrace functions 2021-09-20 10:59:59 +02:00
akallabeth
53a52a055d Added missing WINPR_ASSERT to MessageQueue 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
673fb46836 Fixed uninitialized warnings 2021-09-10 08:16:25 +02:00
Armin Novak
4daa09c3e5 Fixed missing checks for queue functions 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
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
68f24477f6 Fixed compilation warnings on mac 2021-08-26 15:08:28 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak
5eea7fc12d WINPR_UNUSED argc, argv for unit tests 2021-08-24 10:45:57 +02:00
Armin Novak
f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Armin Novak
00c5a42eef Fixed warnings in TestLinkedList 2021-08-02 10:28:06 +02:00
Armin Novak
610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Mike Gilbert
0c81c73c8d winpr: avoid calling FIPS_mode() with OpenSSL 3.0
Fixes: 26bf2816c3
2021-08-02 08:27:07 +02:00
Martin Fleisz
74c6ad9906 test: Add unit test for CommandLineParseCommaSeparatedValuesEx 2021-07-07 09:07:46 +02:00
Martin Fleisz
a29cffbb6d winpr: Fix parsing of comma separated values if list is an empty string 2021-07-07 09:07:46 +02:00
Alexandru Bagu
9c259f09ec fix setValue for HashTable 2021-06-28 09:12:40 +02:00
Armin Novak
09cf11ecf0 WinPR: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
akallabeth
6726772d8d Fixed integer warnings 2021-06-18 09:41:02 +02:00
akallabeth
8d82adb28a Fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak
2e0d1cc33c Fixed integer warnings, fixed data types 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