Commit Graph

24 Commits

Author SHA1 Message Date
matt335672 ae836fb543 Update module interfaces with new calls for resizing
This commit DOES NOT compile.

This change alters these module interface calls:-
1) mod_server_monitor_resize() (Call from xrdp to module). Updated.
2) server_reset() (Call from module to xrdp). Replaced.

The mod_server_monitor_resize() call is updated :-
1) to allow a monitor list to be passed in for a multimon resize
2) with an 'in_progress' return value which tells the caller whether or
   not to expect a callback.

The server_reset() call served two purposes up until now:-
1) To allow a module to resize a single monitor session. There
   is no way to request a multi-monitor resize from the module
2) (with bpp == 0) To signal to the mm resize state machine that
   a server screen resize hsa finished.

This is split into two calls:-
1) client_monitor_resize() to allow a mdule to request a
   multimon resize.
2) server_monitor_resize_done(). This is called by a module
   when a resize is completed.
2024-02-15 16:48:13 +00:00
matt335672 5ed9b96530 Add missing include guards 2023-01-31 09:30:36 +00:00
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 0b5445b676 Remove unnecessary error from neutrinordp log 2021-10-12 14:37:28 +01:00
matt335672 949a81443b Add server_chansrv_in_use() to module interface 2021-06-08 14:11:17 +01:00
aquesnel b9bdee6ccc
Unify logging in mc/* (#1806)
* Fixing formatting with astyle in mc/*
* Migrating logging to LOG() and LOG_DEVEL() in mc/*
* Removing LIB_DEBUG
2021-02-12 12:09:42 +00:00
Matt Burt 1f8bb57fd6 Improve source_info commenting and fix neutrino slow link 2020-10-20 09:55:17 +01:00
Alexandre Quesnel 7e58209b19 Fixing the build with --enable-xrdpdebug and CFLAGS=-Werror -Wall 2020-07-25 23:53:26 +00:00
Pavel Roskin b8ed23daab Constify the value argument to mod_set_param 2017-01-11 11:59:11 -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 4a553e07af update the module API 2015-07-10 21:57:04 -07: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 31669e4720 update mc interface 2010-12-09 20:41:58 -08:00
Jay Sorg 4d4f80bfc4 work on freerdp 2010-11-19 20:34:20 -08:00
Jay Sorg 4f88bf83c1 fixes for bell function 2010-11-18 21:05:32 -08: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 859dc139f0 update copyright year 2009-01-25 02:11:15 +00:00
jsorg71 38b789e81f update copyright year 2008-01-30 07:30:10 +00:00
jsorg71 bb88a8285f early work 2007-06-03 08:46:23 +00:00
jsorg71 abbcc9c02e added mc 2007-06-03 07:14:10 +00:00