Commit Graph

48 Commits

Author SHA1 Message Date
matt335672
275eaf7683 Rework transport connect logic
There are a number of ways the existing transport connect logic in
trans_connect could be improved for POSIX compatibility, and also
slightly tidied up:-
1) The same socket is re-used for multiple connect attempts following
   failure which isn't behaviour defined by POSIX.1-2017 (although it
   works on Linux).
2) An asynchronous connect is started, and then after a short
   delay connect() is called again on the same socket. POSIX.1-2017
   is clear that in this situation EALREADY is returned before the
   connection is established, but is silent on the behaviour expected
   when the connection is established. Returning success is an option,
   but so is returning EISCONN. The current code assumes the connect()
   call will succeed.
3) The code contains two virtually identical, quite complex loops for
   TCP and UNIX sockets, differing only in the calls to create a socket
   and connect it.
4) trans_connect() contains looping and retry logic, but this isn't
   seen as sufficient by the chansrv connect code in xrdp/xrdp_mm.c and
   the Xorg connect code in xup/xup.c. Both of these implement their own
   looping and retry logic on top of the logic in trans_connect(),
   resulting in slightly unpredictable behaviour with regard to
   timeouts.
5) A socket number can technically be zero, but in a couple of places
   this isn't allowed for.

This PR attempts to correct the implementation of trans_connect(),
and also to simplify the areas it is called from.

As part of the PR, the signature of the server_is_term member of the
xrdp module interface is changed to match the signature expected by the
is_term member of a struct trans. This allows for trans_connect()
in xrdp modules to directly access g_is_term() within the main xrdp
executable. At the moment this functionality is only used by the xup
module.
2022-03-31 20:48:07 +01:00
matt335672
8b9b22c773 Create shared GUID module to simplify session guid handling 2021-11-25 13:29:55 +00:00
matt335672
0b5445b676 Remove unnecessary error from neutrinordp log 2021-10-12 14:37:28 +01:00
matt335672
fe28af93e8 Split up vnc.c into modules and re-implement clipboard functions 2021-06-08 14:11:17 +01:00
matt335672
949a81443b Add server_chansrv_in_use() to module interface 2021-06-08 14:11:17 +01:00
Alexandre Quesnel
52707ac686 Fixing formatting with astyle 2021-05-08 16:58:11 +00:00
Christopher Pitstick
deb66ce766 Resolution switching without reconnecting.
- Based on https://github.com/jsorg71/xrdp/tree/dynamic_monitor
- Tested with xorgxrdp
- Tested with vnc
- Only works with single monitor.
- Update documentation to clarify the difference between MSTSC and
Microsoft Remote Desktop.
- Does not include compatibility with /gfx at this time, which is still
in testing.
- Updates to include ms-rdpedisp.h header for the 2.2.2 specification of
the protocol.
- Adds new dynamic_monitor_layout struct that shares the number of
monitors with xrdp_client_info.h
- Does not allow for BPP changes because the RDP protocol doesn't
support it.
- Option to disable feature as NeutrinoRDP doesn't support it (It was
based on FreeRDP 1.0.1 which didn't yet have this feature.)
- Add CLIENT_MONITOR_DATA_MAXIMUM_MONITORS constant and reference
spec definition.

Depends on https://github.com/neutrinolabs/xorgxrdp/pull/183
2021-04-22 01:34:03 -04:00
Matt Burt
1f8bb57fd6 Improve source_info commenting and fix neutrino slow link 2020-10-20 09:55:17 +01:00
matt335672
3c4b42b1aa Implemented resize and multimon support for VNC backend 2020-06-04 15:10:35 +01:00
Jay Sorg
eb56683df0 update the module version 2019-04-25 14:54:25 -07:00
Jay Sorg
4cbf84d99b vnc: implement suppress output 2019-04-25 14:54:25 -07:00
Pavel Roskin
b8ed23daab Constify the value argument to mod_set_param 2017-01-11 11:59:11 -08:00
Jay Sorg
57905d71ad vnc: change password file to use guid hash 2016-12-03 23:12:48 -08:00
Pavel Roskin
aeeb3d2c2e Fix warnings detected by -Wwrite-strings 2016-07-08 04:29:42 +00:00
Pavel Roskin
ca9cbcafc8 Typo fixes 2016-05-04 23:33:30 -07:00
Pavel Roskin
f8cb1588ef Replace "charactor" with "character" everywhere 2016-01-30 17:33:04 -08:00
Jay Sorg
bfe69badc3 vnc: remove rfbDes calls 2015-08-18 18:05:45 -07:00
Jay Sorg
527bac0624 move libvnc to trans for io 2015-07-12 01:07:10 -07:00
Jay Sorg
4a553e07af update the module API 2015-07-10 21:57:04 -07:00
Anthony Agresta
6ddc43c4fc vnc: Added delay_ms option. Fixes neutrinolabs/xrdp#182 2014-11-07 09:32:00 -05:00
Jay Sorg
c6fa03102f copyright year update 2013-06-08 10:51:53 -07:00
Laxmikant Rashinkar
1123323fda o moved from GNU General Public License to Apache License, Version 2.0
o applied new coding standards to all .c files
o moved some files around
2012-09-19 20:51:34 -07:00
Jay Sorg
4f88bf83c1 fixes for bell function 2010-11-18 21:05:32 -08:00
Nicola Ruggero
104f762e5d Added bell (pcspeaker) support 2010-10-26 13:08:28 +02:00
jsorg71
d70d80a33d update copyright year 2010-07-04 07:20:56 +00:00
jsorg71
33b4e7f417 channel fixes 2009-08-15 02:49:13 +00:00
jsorg71
9e68f3bba0 update copyright year 2009-01-24 07:04:24 +00:00
jsorg71
d061537be9 added new wait_obj functions 2008-04-03 06:43:30 +00:00
jsorg71
38b789e81f update copyright year 2008-01-30 07:30:10 +00:00
jsorg71
d515eb7cfc moved scp to xrdp 2007-04-20 06:29:18 +00:00
ilsimo
b1eface57f added use of libscp 2007-03-25 12:18:44 +00:00
jsorg71
ecc9f2e692 clipboard redir work 2007-01-25 05:34:14 +00:00
jsorg71
d2802912f6 copyright year update 2007-01-12 04:51:48 +00:00
jsorg71
4b3b83044a more work on channel support 2006-12-30 05:04:13 +00:00
jsorg71
b295e08ad2 let module decide if alt-gr needs to be ignored 2006-12-09 19:30:57 +00:00
jsorg71
4d8c25da97 copyright year update 2006-02-04 18:24:05 +00:00
jsorg71
7d891a1bde added server_reset(which uses demand_active) for resizing the rdp client 2005-08-24 01:09:33 +00:00
jsorg71
1881c8b1b8 added param1 to paint_rect 2005-08-20 22:58:51 +00:00
jsorg71
9d2ce459da add new painter funcs 2005-08-18 00:32:11 +00:00
jsorg71
7ad0525527 added clipping functions to the mod interface 2005-07-07 03:36:56 +00:00
jsorg71
992dbfa7b3 moved a bunch of files around 2005-06-28 03:11:35 +00:00
jsorg71
7ac2f6506f remove vncauth.c 2005-03-13 01:17:30 +00:00
jsorg71
d5dea39baf added connection log 2005-03-06 03:44:27 +00:00
jsorg71
15acc669dd a few minor fixes 2005-02-22 02:49:53 +00:00
jsorg71
8defc32e27 readability and 64 bit changes 2005-02-20 06:06:26 +00:00
jsorg71
cf6e2abd41 added a bunch of error checks 2005-02-08 03:45:30 +00:00
jsorg71
9611a5f111 move some file to common 2005-01-07 01:05:30 +00:00
jsorg71
ae38cee2f0 added vnc mod 2004-11-28 04:56:58 +00:00