Commit Graph

62 Commits

Author SHA1 Message Date
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
ceb7bd1d41 [warnings] fixed clang build warnings 2023-11-24 18:19:03 +01:00
akallabeth
bb5345c60e [freerdp,api] add FREERDP_ENTRY_POINT
C requires prototypes or compilers will complain about them missing. Our
library entry points do not have such, therefore add the macro
FREERDP_ENTRY_POINT which declares the function prototype automatically
before the function.
2023-08-25 14:36:05 +02:00
Armin Novak
70e437dbeb [channels,echo] assertions and warning fixes 2023-07-27 20:02:43 +02:00
Armin Novak
970f0c54e8 [stream] use const correct Stream_Pointer access 2023-06-08 08:09:33 +02:00
akallabeth
a5b42f0f84 [includes] untangled circular includes 2023-03-15 08:22:23 +01:00
akallabeth
cf9777cd92 [channels] simplified server linking 2023-03-01 08:18:34 +01:00
akallabeth
c3a82daad6 [channels] simplified client linking 2023-03-01 08:18:34 +01:00
David Fort
3478051f15 dynamic channels: mutualize things for listeners and plugins
The same code is copied in all dynamic channels to create a plugin, have a listener,
and manage the channel lifecycle. This patch does a mutualization effort so that channels
only have to code things that are specific to them.
2022-07-07 12:21:23 +00:00
David Fort
ffcb25a925 echo channel: use generic types for the echo channel
I missed this channel when doing the refactoring.
2022-07-07 12:21:23 +00:00
Pascal Nowack
9d627e0df2 channels/server: Add APIs for DVCs to get notified of channel id
This allows server implementations to watch these channel ids for their
creation statuses.
2022-06-08 15:26:51 +02:00
akallabeth
667b471686 Fixed cast-quality warnings 2022-04-28 09:17:20 +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
d73d0d4610 Use defines for echo channel 2022-01-19 09:24:57 +01:00
Armin Novak
96cf17a45b Replaced (IWTSPlugin*) casts with struct address return 2021-10-07 16:22:04 +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
75aab487e2 Added duplicate initialization check for plugins. 2020-08-10 16:17:44 +02:00
akallabeth
64ad42b95b Fixed DestroyListener arguments and call order 2020-05-13 17:11:17 +02:00
akallabeth
2f5e5359f6 Destroy channel listeners on terminate 2020-05-12 11:40:42 +02:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
44eebbb6e0 Fixed compiler warnings. 2018-03-07 14:47:06 +01:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Norbert Federa
c6e6b44143 countless WLog/printf format specifier fixes 2016-11-25 17:06:25 +01:00
Marc-André Moreau
dee76617d9 channels: remove thread-local storage usage 2016-11-15 11:41:01 -05:00
Armin Novak
943e295714 WLog using C99 compatible variadic macros. 2016-10-07 14:05:27 +02:00
Armin Novak
9f5da483dc Reformatted files touched in last 2 commits. 2016-10-06 13:43:12 +02:00
Armin Novak
88a3b8dd76 Initializing channel context in each thread. 2016-10-06 13:43:12 +02:00
Norbert Federa
90cdfa7646 cmake: replaced STATIC_CHANNELS with BUILTIN_CHANNELS 2016-06-15 13:36:27 +02:00
Bernhard Miklautz
783807229d build: add missing dependencies
Add all missing dependencies found with --no-undefined. Since
dependencies aren't exported anymore (if not required) it is no necessary
to explicitly list all required libraries.
2016-04-07 15:10:00 +02:00
Bernhard Miklautz
9e8c6c99b6 First shot on fixing over linking
If a target is linked against libraries with cmake
(target_link_libraries) and the libraries are not marked as PRIVATE
they are "exported" and in case a other target is linked against this
target it is also linked against *all* (not private) libraries.

Without declaring private libraries PRIVATE a lot of over linking
(linking against unneeded libraries) was done.
2016-03-29 18:14:34 +02:00
Norbert Federa
ef4b29e5b3 ConvertFromUnicode fixes and misc hardening
- Added missing ConvertFromUnicode checks
- If ConvertToUnicode allocates memory, guarantee the null termination
  similar to ConvertFromUnicode's implementation
- Fixed some TestUnicodeConversion.c CTest return values
- Added some CTests for ConvertFromUnicode and ConvertToUnicode
- Misc code and protocol hardening fixes in the surrounding code regions
  that have been touched
2016-03-03 16:56:19 +01:00
Armin Novak
5acd80dd5b Exporting channel entry points. 2016-02-29 15:18:19 +01:00
Bernhard Miklautz
6fa3608111 cleanup cmake exports and pkg-config files
With this commit the "exported" components (usable with pkg-config and
cmake find module package)
* winpr - winpr library and headers
* freerdp - core library and headers
* freerdp-client - client specific library
* freerdp-server - server specific library
* rdtk - rdtk headers and library

To allow the installation of multiple different version (different major
number) the include files were moved into the respective sub folder:
freerdp -> freerdp{MAJOR}/freerdp (currently freerdp2/freerdp/)
winpr -> winpr{MAJOR}/winpr (currently winrp1/winpr/)
rdtk -> rdpk{MAJOR}/rdtk (currently rdtk0/rdtk/

The generated pkg-config and cmake find modules now also include the major
version number. Currently the following pkg-config are generated and
installed.
* winpr1
* freerdp2
* freerdp-server2
* freerdp-client2
* rdtk0

As cmake is able to handle multiple versions out of the box the
following can be used to find a specific module:

find_package(WinPR)
find_package(FreeRDP)
find_package(FreeRDP-Server)
find_package(FreeRDP-Client)
find_package(RdTk)

As cmake doesn't automatically resolve dependencies for packages it is
necessary to manually include the requirements. For example if
FreeRDP-Client is required WinPR and FreeRDP need to be included
(find_package) as well.

This commit also fixes the installation when STATIC_CHANNELS are built.
WITH STATIC_CHANNELS all channels are linked into libfreerdp-client, for
this all channels are generated as linker archive and linked together in
the final step. Before the intermediate linker archives were, although
not required and useful, installed. Same applies for server side
channels.
2016-01-12 17:32:33 +01:00
Bernhard Miklautz
97edeca204 Merge pull request #2874 from akallabeth/stdtypes
Using stdint.h and stdbool.h for type definitions
2015-12-17 16:37:54 +01:00
Armin Novak
cb958ba9c6 Added pdb files to package target.
Fixed name collision with freerdp-shadow targets.
2015-12-15 12:07:21 +01:00
Armin Novak
90251f5e0d Fixed OnNewChannelConnection arguments 2015-12-14 14:18:50 +01:00
Martin Haimberger
52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Martin Haimberger
65fd259610 misc fixes:
fixed all bugs from the review
checking all WaitFor*Object/s calls
2015-07-30 06:49:21 -07:00
Martin Haimberger
b8c110d19b introduced channel error reporting system
The rdpContext gets an event which will
get set if an error occoured in a channel.

If a thread or a void callback has to report an
error it will get signaled by this system.
2015-07-15 00:50:35 -07:00
Martin Haimberger
0cfbc6648b channel echo hardend 2015-06-18 03:04:32 -07:00
Norbert Federa
1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00
Martin Fleisz
0be28ba0f6 Merge pull request #1965 from akallabeth/dynamic-addin-naming
Dynamic channel library naming
2014-10-31 13:42:16 +01:00
Armin Novak
12e5c3a838 Fixed static / dynamic plugin entry point. 2014-10-27 16:33:51 +01:00
Armin Novak
059374457d Removed library prefix override. 2014-09-17 11:27:11 +02:00
Armin Novak
b1e9ffb655 Using wlog for channel logging now.
Fixed compiler warnings and broken callback in urbdrc.
2014-09-15 08:48:46 +02:00