Commit Graph

111 Commits

Author SHA1 Message Date
Armin Novak
f313fabb2b Added fallback for libusb < 1.0.19
we use stream_id functions which were introduced with 1.0.19
2020-01-13 15:23:57 +01:00
Armin Novak
b5bb6e3ea9 Fixed LIBUSB_HOTPLUG_NO_FLAGS definition
libusb documentation is a bit misleading, this flag was
introduced with 1.0.20
2020-01-13 15:13:35 +01:00
Armin Novak
d0929cbf2f Extend LIBUSB_API_VERSION check
The define exists since 1.0.13, so to compensate for older also
check if the variable is defined.
2020-01-10 10:52:23 +01:00
Armin Novak
b0de74cad2 Fallback definition for LIBUSB_HOTPLUG_NO_FLAGS
The flag was first introduced with libusb 1.0.16, so
define it if we are using an older version.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:14:09 +01:00
Armin Novak
d044915a7e Fixed stream handling and missing includes. 2019-12-17 15:51:24 +01:00
Armin Novak
c4a141cd8a Fixed some scanbuild warnings. 2019-11-22 11:47:16 +01:00
Armin Novak
0927d7aa50 Rewrite of urbdrc channel.
* Fix command line parsing
* Properly handle channel creation/destruction
* Use wStream API for parsing
2019-11-22 10:56:21 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
0c87eaee4d COMMAND_LINE_ARGUMENT structs contain parser results, use one per instance
Remove the old global structs as the parser modifies them. When using
multiple instances in the same process space this could break parsing.
2019-10-28 13:30:05 +01:00
AzureusNation
4955a0e5b8 Fixes hub was not found! error
Again as with auto usb detection strtol needs to use base 10 and force to use base 10 else the conversion does not work correctly.
2019-10-23 09:56:23 +02:00
AzureusNation
7d6a10aaff Fixes Auto USB Redirection
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.
2019-10-23 09:56:23 +02:00
Kyle Evans
d796920f8f (FreeBSD) Build fixes for urbdrc 2019-08-19 16:57:56 +02:00
Armin Novak
6c9130f7d6 Fixed sign-compare warnings. 2019-04-05 09:14:35 +02:00
Armin Novak
4430187e8d Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak
ef1728faf5 Fixed NULL dereferences and uninitialized values 2019-01-30 16:11:10 +01:00
Armin Novak
fad20be6e6 Fixed missing includes. 2018-08-27 14:34:42 +02:00
Armin Novak
62c1696d4c Removed use of unchecked sprintf 2018-08-27 14:34:42 +02:00
Armin Novak
114abad767 Removed use of strcpy. 2018-08-27 14:34:09 +02:00
Pascal J. Bourguignon
15f2bafeab Cleaned up const char** -> char** for argv, since we definitely do modify the argv!
(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.
2018-06-06 16:43:09 +02:00
Armin Novak
4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
David Fort
ff8f7e9474 Disambiguate USB error messages and fix a typo 2017-11-06 22:09:01 +01:00
Armin Novak
8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Armin Novak
0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
David Fort
48163a27db Merge pull request #3906 from akallabeth/addin_cast_fix
Addin cast fix
2017-05-22 11:12:05 +02:00
Ilya Shipitsin
07c2345879 resolve an issue identified by cppcheck:
[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.
2017-05-06 00:05:59 +05:00
Armin Novak
b0289e3ed8 Fixed cast warnings. 2017-04-10 10:39:01 +02:00
Ilya Shipitsin
087671bcbb Remove redundant condition
[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.
2017-02-02 00:29:37 +05:00
Ilya Shipitsin
efaf1819ea Resolve possible null pointer dereference
[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.
2017-01-31 15:59:25 +05: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
Armin Novak
943e295714 WLog using C99 compatible variadic macros. 2016-10-07 14:05:27 +02:00
Armin Novak
b7f8dc3d43 Fixed UUID find. 2016-06-27 10:37:24 +02:00
Norbert Federa
90cdfa7646 cmake: replaced STATIC_CHANNELS with BUILTIN_CHANNELS 2016-06-15 13:36:27 +02:00
Bernhard Miklautz
bafe1aa17e usbdrc: remove unused dependencies 2016-03-29 18:14:34 +02:00
Armin Novak
fb88ad0ee6 Fixed symbol export for sound plugins. 2016-03-03 17:17:13 +01:00
Armin Novak
5acd80dd5b Exporting channel entry points. 2016-02-29 15:18:19 +01:00
Bernhard Miklautz
e6f013eac7 fix spelling
replace occured with occurred
Fixes #3142
2016-02-22 17:01:43 +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
6ab0187d84 Merge remote-tracking branch 'upstream/master' into mh-channel
Conflicts:
	channels/audin/client/oss/audin_oss.c
	channels/drive/client/drive_main.c
	channels/printer/client/printer_cups.c
	channels/printer/client/printer_main.c
	channels/rail/client/rail_main.c
	channels/rdpgfx/client/rdpgfx_main.c
	channels/rdpsnd/client/oss/rdpsnd_oss.c
	channels/remdesk/client/remdesk_main.c
	channels/remdesk/server/remdesk_main.c
	channels/tsmf/client/tsmf_media.c
2015-07-15 01:57:07 -07:00
MartinHaimberger
b06d83ba80 Merge pull request #2766 from akallabeth/snprintf_to_sprintf_s
Replaced snprintf with sprintf_s
2015-07-15 09:47:43 +02:00
Bernhard Miklautz
68e8569110 winpr/synch: remove the dependency on winsock.h
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_*.
2015-07-14 11:39:41 +02:00
David FORT
b83ab92776 Hardened urbdrc channel 2015-07-06 16:46:21 +02:00
Armin Novak
cf9f975341 Replaced snprintf with sprintf_s 2015-07-03 13:26:15 +02:00
Armin Novak
d18b0fbeb4 Handle API updated. 2015-07-03 09:52:52 +02:00
ivan-83
0fda0eb0de Code style changed. 2015-05-27 22:59:57 +03:00