Commit Graph

160 Commits

Author SHA1 Message Date
Armin Novak
8276c145e0 Fixed rdpdr related warnings 2021-06-18 11:32:16 +02:00
Armin Novak
ccfe0c129e Removed checks already done by WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak
d039a1ac8f Filter RDPDR types other than drives on windows hotplug 2021-03-09 13:58:28 +01:00
Armin Novak
c7bf33aad0 Fixed drive hotplug path comparison. 2021-01-27 09:27:08 +01:00
akallabeth
9e8d3fbbf5 Check drive to hotplug for already being redirected
some hotplug implementations report the same drive multiple times.
to avoid redirecting the same drive multiple times check if it is
already in the list before adding.
2021-01-15 10:41:12 +01:00
Martin Fleisz
c78e31e451 channel/rdpdr: Fix hotplug for drive redirection on Windows
The path was incorrectly cut of after the drive letter causing hot
plugged drives to show up empty and disconnecting the client if the
device was removed later on.
2020-11-13 12:26:29 +01:00
akallabeth
66dc4cc9ee Fixed compilation warnings. 2020-11-10 08:53:43 +01:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
akallabeth
6e5f5de439 Do not abort disc hotplug if no access to mount tab. 2020-10-27 15:45:56 +01:00
Alexandr
616af2d5b8
fixed build on freebsd (#6395)
* fixed build on freebsd
2020-07-27 11:36:24 +02:00
Marco van Wieringen
9db147c317 Add support for getmntent support on Illumos
This implements reading mount entries on Solarish operating systems like
OpenIndiana etc using the somewhat different getmntent support available
there.
2020-07-24 09:16:46 +02:00
akallabeth
b971c5c97f Use CMake to detect availability of getlogin_r 2020-07-01 16:50:20 +02:00
akallabeth
caff01877d Fixed fallback to getlogin for android 2020-06-22 12:09:36 +02:00
akallabeth
1c6a6923f8 Fixed broken const variable. 2020-06-22 11:51:39 +02:00
akallabeth
36478d3d0b Replaced getlogin with getlogin_r 2020-06-22 11:51:38 +02:00
qarmin
fe8bad1698 Don't allow to overflow dev_array array 2020-05-01 20:34:59 +02:00
Armin Novak
30db616cec Added a free function to erase streams not processed.
When shutting down the streams still in the queue were not properly
freed.
2020-02-21 11:31:15 +01:00
Armin Novak
d2aef75004 Fix #5852: handle CHANNEL_EVENT_WRITE_CANCELLED
When channels are cleaned up OpenHandle is most of the time
already 0. Ignore the argument checks for
CHANNEL_EVENT_WRITE_CANCELLED and CHANNEL_EVENT_WRITE_COMPLETE
only check where actually required (CHANNEL_EVENT_DATA_RECEIVED)
2020-01-29 08:52:25 +01:00
Armin Novak
ac553e1bb5 Fix #5805: windows hotplug drive detection. 2020-01-07 10:35:12 +01:00
ajlex140
2f2f4f91d8 reply with empty irp package with error code, if irp device is unavailable 2019-12-09 11:43:02 +01:00
Armin Novak
9f3adf10f8 Fixed #5727: use getmntent to read /proc/mounts 2019-11-18 15:25:18 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
75ed12f1f0 Fixed userdata pointer and CHANNEL_EVENT_WRITE_CANCELLED message. 2019-11-06 13:01:43 +01:00
Armin Novak
1bcb799560 Listen to CHANNEL_EVENT_WRITE_CANCELLED and emit if queue is cleared. 2019-11-06 13:01:43 +01:00
Armin Novak
1b78b59926 Fixed #4809: Properly process CHANNEL_EVENT_WRITE_COMPLETE 2019-11-06 13:01:43 +01:00
Armin Novak
09d14a2462 Fixed VirtualChannelWriteEx error case leaks. 2019-11-06 13:01:43 +01:00
Armin Novak
64f64cd035 devman_load_device_service device argument can be const. 2019-10-24 15:04:48 +02:00
Armin Novak
5e9f454256 Use stat instead of lstat to iterate /Volumes
Some entries are symbolic links, so follow them and check the link
target for being a directory.
2019-09-12 14:35:01 +02:00
Armin Novak
6f82ab6204 Hotplugging only for drive redirection. 2019-09-12 11:14:39 +02:00
Armin Novak
935ed36e68 Add dynamicDrives hotplug option. 2019-08-23 10:27:01 +02:00
Armin Novak
3eb3ad3cab Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak
9566ae0e90 Fixed mac compilation warnings. 2019-02-21 17:30:12 +01:00
Bernhard Miklautz
162a69b0f0
Merge pull request #5139 from akallabeth/drive_hotplug_shutdown_crash_fix
Fixed crash on drive hotplug shutdown.
2019-02-07 10:08:41 +01:00
Armin Novak
192680a001 Added callback to handle printer custom components in printer backend. 2018-12-12 10:57:53 +01:00
Armin Novak
598ece4ae7 Fixed crash on drive hotplug shutdown. 2018-12-12 09:32:09 +01:00
Jonathan Lafontaine
35d7a1e38d Allow fixed drive redirection on Windows (a:, c:, ...) and fix macos drive duplication. 2018-10-29 10:17:42 -04: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
Ondrej Holy
10bddb9fd9 channels/rdpdr: Fix leak found by covscan
leaked_storage: Variable "newbuf" going out of scope leaks the storage it points to.
leaked_storage: Variable "keys" going out of scope leaks the storage it points to.
leaked_storage: Variable "pKeys" going out of scope leaks the storage it points to.
leaked_storage: Variable "s" going out of scope leaks the storage it points to.
leaked_storage: Variable "computerNameW" going out of scope leaks the storage it points to.
leaked_storage: Variable "s" going out of scope leaks the storage it points to.
2018-08-22 13:35:43 +02:00
Armin Novak
4035ed46c8 Added automount flag for windows and macos implementations. 2018-07-30 12:37:19 +02:00
Armin Novak
e8393a22e2 Remember if drive was added by automout. 2018-07-30 12:31:11 +02:00
Armin Novak
a716dc244c Removed duplicate resource free. 2018-06-18 10:23:57 +02:00
Armin Novak
357391bd93 Fixed channel duplicate disconnect handling 2018-04-09 11:26:43 +02:00
Armin Novak
2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak
64cfd750f9 Fixed #4384: Drive hotplug detection 2018-01-25 15:43:53 +01:00
David Fort
41823080f9 Fix users of Stream_GetPosition() that returns size_t 2017-12-11 22:38:58 +01:00
Armin Novak
9318707291 Added return check for ConvertFromUnicode. 2017-07-24 08:53:21 +02:00
Armin Novak
3586f8502c Fixed missing unicode conversion for mac drive redirection. 2017-07-20 12:35:43 +02:00
Armin Novak
8fa6020b5f Add legacy mount locations, limited max depth. 2017-04-18 09:13:35 +02:00
Armin Novak
c1872de641 Fixed WCHAR/CHAR conversion for drive path. 2017-04-13 16:20:01 +02:00