Commit Graph

16643 Commits

Author SHA1 Message Date
akallabeth
784becd946 [winpr,image] add winpr_bitmap_write_ex
Added a helper function writing a bitmap from an image that has a stride
that is not width * <bytes per pixel>
2022-12-16 11:03:13 +01:00
akallabeth
9d6a06a197 [channels,rdpdr] fix misleading log entries
* Use __FUNCTION__ instead of copying the name to the message
* Fix freerdp_rdpdr_dtyp_string argument to get correct name
2022-12-16 09:42:44 +01:00
Armin Novak
37d7b98449 [channels,rdpdr] refactoring server callbacks
* Add callbacks for all messages exchanged between client and server
  to allow server implementations to intercept them.
* Unify logging
* Add device tracking
2022-12-15 14:57:29 +01:00
akallabeth
3b5347e229 [channel,dvc] unify and log DVC callbacks
* Added a check function that logs errors if the required callbacks are
  not set.
* Encapsulate calling in (static) helper functions
2022-12-15 14:57:29 +01:00
akallabeth
1f16250a7b [channels,rdpsnd] prevend multiple OnOpen calls
due to the nature of the sound channel there are multiple listeners
waiting for the server to open the channel and most of them are called
by the server. Only open the channel once.
2022-12-15 14:57:29 +01:00
akallabeth
a2329281a4 [channels,rdpdr] fix possible surface leak
* Ensure DeleteSurface is called before CreateSurface: Under certain
  conditions it is possible that there already exists a surface with the
  same id as the new CreateSurface PDU. Delete the already existing
  instance in that case before creating a new one.
* Simplify surface cleanup on shutdown: Use HashTable_Foreach
2022-12-15 14:57:29 +01:00
Armin Novak
df4c076946 [channels,rdpdr] abort on invalid device request
If a request references a non existing device abort.
2022-12-15 14:57:29 +01:00
Armin Novak
186e97e0a8 [channels,rdpdr] better logging of device manager
if a device could not be found print a better log message
2022-12-15 14:57:29 +01:00
Armin Novak
231babef5e [channels,rdpdr] improve log message
try to stringify magic numbers in log message
2022-12-15 14:57:29 +01:00
akallabeth
b5e2c2a81d [settings] added stringify function for RDPDR_RTYP_* 2022-12-15 14:57:29 +01:00
Armin Novak
51e49b4329 [winpr,asn] Fixed a compiler warning
WinPrAsn1DecReadEnumerated expects an argument of type
WinPrAsn1_ENUMERATED* so ensure the variable referenced is of said type.
2022-12-15 14:57:29 +01:00
Armin Novak
a8d3693b27 [core,credssp] fix conversion from unicode
there was a mixup in the conversion and WCHAR was treated as utf8.
2022-12-15 14:57:29 +01:00
Martin Fleisz
103c0a983c core: Fix handling of alternate shell if set to an empty string
In case alternate shell was set to an empty string ("") the old code
would try to convert it to a WChar string. This resulted in a NULL
pointer being returned by `ConvertUtf8ToWCharAlloc` that was interpreted
as an error and the connection failed.
2022-12-15 11:56:05 +01:00
akallabeth
8c6ee2061b [client,cmdline] fixed /gfx parsing
* Fixed a bug not activating AVC444 when requested
* Unified legacy /gfx-h264 parsing with /gfx
2022-12-15 11:20:34 +01:00
Bernhard Miklautz
e530999156 new [tls/server]: disable client side renegotiation 2022-12-15 11:06:19 +01:00
Armin Novak
3f63365652 [build] make LTO a configuration option 2022-12-14 16:09:46 +01:00
Armin Novak
74f273e593 [core,info] improve rdp_read_info_null_string
* Removed comments with invalid assumptions
* Added arguments to rdp_read_info_null_string to indicate if the string
  is expected to be '\0' terminated and what is actually read for error
  logs
2022-12-14 11:52:00 +01:00
Armin Novak
0a7d19ee7a [core,info] 0 check cbClientAddress and cbClientDir
if one of the above values is 0 do not add the size for the '\0'
2022-12-14 11:52:00 +01:00
Armin Novak
87ae9dec0d [core,info] ensure stream length
ensure the stream is large enough for all info packets
2022-12-14 11:52:00 +01:00
Armin Novak
8af5f15769 [core,info] enforce cbClientDir limits
the cbClientDir field limits defined in [MS-RDPBCGR] 2.2.1.11.1.1.1
Extended Info Packet (TS_EXTENDED_INFO_PACKET) are now properly enforced.
2022-12-14 10:30:36 +01:00
Armin Novak
0da0f5ca54 [core,info] enforce extended info limits
the cbClientAddress field limits defined in [MS-RDPBCGR]
2.2.1.11.1.1.1 Extended Info Packet (TS_EXTENDED_INFO_PACKET) are now
properly enforced.
2022-12-14 10:30:36 +01:00
akallabeth
4ab9fb4425 [channels,rdpsnd] Add PlayEx callback
This new callback is preferred over the older Play callback and provides
the AUDIO_FORMAT as additional argument.
2022-12-14 10:17:30 +01:00
akallabeth
8aa880c0ba [channels,rdpsnd] Callback on server format
When the server sends the format list to the client call a device
callback that provides the details to the audio backend.
2022-12-14 10:17:30 +01:00
David Fort
a1febe11f0 multi-transport: refactor multi-transport handling
Prepare the parts of the code that handle multi-transport to really establish
UDP connections and manage alternative transports.
2022-12-13 15:54:33 +01:00
David Fort
67e1c2dccd gcc: fix handling of multi-transport flags
Multi-transport flags must be merged between local and remote so that on both sides
we know the shared parameters. Also this patch sends multi-transport GCC block when
multi-transport is enabled.
2022-12-13 15:54:33 +01:00
David Fort
deb79c3f90 fix typo 2022-12-13 15:54:33 +01:00
David Fort
e915b294d5 winpr: add functions to test for read / write availability in pollset 2022-12-13 15:54:33 +01:00
akallabeth
d399c1c6fb [codec,xcrush] follow up to #8529
There was still an issue left, if diff == 0 then the loop counter did
never increment.
Skip this case now completely as the memory does not need to be copied
anyway.
2022-12-13 15:41:58 +01:00
Armin Novak
2b49047c34 [client] Fix keyboard input
properly pass key repeat events to the server.
2022-12-13 14:37:05 +01:00
Armin Novak
7fd6278bc6 [server] fixed key press checks
Do not test KBD_FLAGS_DOWN, this only indicates key repeat. Check for
the absence of KBD_FLAGS_RELEASE
2022-12-13 14:37:05 +01:00
Armin Novak
f5724c0c13 [core,input] Fixed API for KBD_FLAGS_DOWN use
KBD_FLAGS_DOWN indicates a key repeat, so it must be absent on first
keypress.
2022-12-13 14:37:05 +01:00
Armin Novak
de0c42273e [uwac] add key repeat state to UwacKeyEvent 2022-12-13 14:37:05 +01:00
Armin Novak
d90aa5d6f5 [client,x11] Fixed #8099: Detect key autorepeat
When a key is pressed in autorepeat mode, skip the KeyRelease events in
between.
2022-12-13 14:37:05 +01:00
fifthdegree
497ada661f Change the logic flow on error to a better style
Use do-while and break instead of checking return value before every
line
2022-12-13 14:26:45 +01:00
fifthdegree
e4b82cf0ef [kerberos] Assert expected pointer arguments 2022-12-13 14:26:45 +01:00
fifthdegree
3ffc32176d Support heimdal kerberos implementation
Add support for heimdal kerberos in addition to mit kerberos
2022-12-13 14:26:45 +01:00
fifthdegree
6c8e4d668d Don't free empty structures 2022-12-13 14:26:45 +01:00
fifthdegree
1e6c5fc782 Allow setting kdc hostname
Use user-provided kdc hostname when given
2022-12-13 14:26:45 +01:00
akallabeth
f67a7aa16a [build] added WITH_DEBUG_CODECS
A new build option to enable more verbose logging in some video codecs.
2022-12-13 13:38:25 +01:00
akallabeth
d27972518f [codec,interleaved] move length check out of loop 2022-12-13 13:38:25 +01:00
Armin Novak
6f6353d76f [codec,interleaved] add codec debug log 2022-12-13 13:38:25 +01:00
Armin Novak
1428b73490 [codec,interleaved] refactored run length reading 2022-12-13 13:38:25 +01:00
Armin Novak
0dc5c94476 [codec,interleaved] added string helper functions 2022-12-13 13:38:25 +01:00
Armin Novak
2648257caa [codec,interleaved] add proper debug logging
log reason for decoder to fail
2022-12-13 13:38:25 +01:00
Armin Novak
b14bdd4501 [gdi] Add failure logging in gdi_Bitmap_Decompress 2022-12-13 13:38:25 +01:00
Armin Novak
7c5e953a44 [gdi] log bitmap update failure reasons 2022-12-13 13:38:25 +01:00
akallabeth
549aad655a [codec,xcrush] fix possible div by zero
If source and destination buffers are equal the calculation of
'rest = num % div' is a division by zero. Avoid that by checking
explicitly for that condition.
2022-12-13 13:37:54 +01:00
akallabeth
adb3b22609 Revert "fix xcrush-divideByZero (when src ==dst)"
This reverts commit 85e830d16f.
2022-12-13 13:37:54 +01:00
akallabeth
babc47e19c [channels,rdpsnd] fix rdpsnd channel cleanup
The rdpsnd channel needs to keep the resources allocated until the last
user (static, dynamic channel) is terminated.
2022-12-13 10:57:34 +01:00
Armin Novak
b41ef0cda7 [core,client] fixed connection timeout abort
the abort condidion was not properly triggered.
2022-12-12 18:08:42 +01:00