It is now possible to add usb devices both via vid+pid and via bus+addr
at the same time. To do this, the ids are directly
given to the corresponding command line options:
/usb🆔<vid+pids>,addr:<bus+addrs>
The dev option still works like before: /usb:id,dev:<vid+pids> or
/usb:addr,dev:<bus+addrs>
The /usb:dev command line option failed silently, because it tried to add the
devices before urbdrc gets initialized. This commit adds a new function
to udevman, that gets called when the urbdrc addin is initialized.
Registering of the given devices is now performed there.
Refactored urbdrc_udevman_register_devices with its helper functions,
because the old implementation was a bit quirky. Removed a unsafe
strcpy, that led to a buffer overflow when given misonstructed command
line options. Doing something like "/usb:id,dev🔢1234##abcd:abcd"
won't work anymore, too.
* libusb polling thread now is responsible for hotplug registration
and removal as well as cleanup.
* Only register hotplug callback on systems with support.
Base 0 does not work when converting the string to long int. This ends up not showing the correct device id and sometimes the wrong bus id. By changing it to base 10 conversion instead of base 0 this fixes the issue of auto redirect usb devices.
(we overwrite the password and pin arguments).
This implies changes in the argument parsing tests that now must pass a mutable argv
(copied from the statically declared test argvs).
Some other const inconsistency have been dealt with too.
[channels/urbdrc/client/libusb/libusb_udevice.c:1666] -> [channels/urbdrc/client/libusb/libusb_udevice.c:1661]: (warning) Either the condition 'request' is redundant or there is possible null pointer dereference: request.
[channels/urbdrc/client/data_transfer.c:2310] -> [channels/urbdrc/client/data_transfer.c:2322]: (warning) Either the condition 'if(transfer_data)' is redundant or there is possible null pointer dereference: transfer_data.
[channels/urbdrc/client/data_transfer.c:2311] -> [channels/urbdrc/client/data_transfer.c:2322]: (warning) Either the condition 'if(transfer_data)' is redundant or there is possible null pointer dereference: transfer_data.
[channels/urbdrc/client/data_transfer.c:2312] -> [channels/urbdrc/client/data_transfer.c:2322]: (warning) Either the condition 'if(transfer_data)' is redundant or there is possible null pointer dereference: transfer_data.
[channels/urbdrc/client/data_transfer.c:2313] -> [channels/urbdrc/client/data_transfer.c:2322]: (warning) Either the condition 'if(transfer_data)' is redundant or there is possible null pointer dereference: transfer_data.
[channels/urbdrc/client/data_transfer.c:2314] -> [channels/urbdrc/client/data_transfer.c:2322]: (warning) Either the condition 'if(transfer_data)' is redundant or there is possible null pointer dereference: transfer_data.
[channels/urbdrc/client/isoch_queue.c:124] -> [channels/urbdrc/client/isoch_queue.c:126]: (warning) Either the condition 'if(isoch)' is redundant or there is possible null pointer dereference: isoch.
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
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.
winsock.h pulls in a lot of defines and dependencies that are not
required and partially unwanted in winpr's core (for parts that are not
related to network). In order to get rid of this dependency and have an
independent defines for extended winpr functions the WINPR_FD_* defines
are used internally (and for exposed functions). Where required, like in
WSAEventSelect, the FD_* is mapped to WINPR_FD_*.
"libfreerdp" consisted of multiple (small) single libraries. If the cmake
option MONOLITHIC was used only one library was build combining all of
the libfreerdp-* libraries.
The only exceptions to this are libfreerdp-server and libfreerdp-client these
are build as separate libraries.
This commit obsoltes non-monolithic builds and makes monolithic builds
the default. The cmake option MONOLITHIC is also removed.
winpr is now always build as single library.
The build option MONOLITHIC_BUILD doesn't influence this behavior anymore.
The only exception is winpr-makecert-tool which is still build as extra
library.
This obsoletes complex_libraries for winpr.