Commit Graph

44 Commits

Author SHA1 Message Date
firewave
fb9c175b11 enabled and fixed -Wmissing-prototypes compiler warnings
Co-authored-by: matt335672 <30179339+matt335672@users.noreply.github.com>
2024-04-23 18:38:20 +02:00
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
matt335672
52a52daddd Split development option into separate things 2021-05-28 10:57:12 +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
Vraiment
4cee6726f8 Make changes to generate dylibs in mac again 2018-01-30 01:21:07 -08:00
Pavel Roskin
6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin
b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08:00
Pavel Roskin
b8ed23daab Constify the value argument to mod_set_param 2017-01-11 11:59:11 -08:00
Pavel Roskin
f25659d2ee Suppress versioning for modules, tell libtool they are modules
Versioning is for libraries. Modules are not libraries; no code is linked
against them.

Libtool makes sure the modules can be opened by dlopen(). That is already
true for ELF format, but other file formats may need special processing.
2017-01-06 10:52:44 -08:00
volth
26a26ef906 fix build with --enable-xrdpdebug=yes 2017-01-04 19:20:44 +00:00
volth
37b4a14b54 fix build with --enable-xrdpdebug=yes 2017-01-04 13:00:01 +00:00
Pavel Roskin
ace7d2c822 Declare unified module interface and use it in modules
This fixes loading modules compiled with a C++ compiler. Remote thandle
type, it's unused. Use tintptr for module data. Don't cast pointers to
long, they won't fit on Win64.
2016-07-08 05:09:09 +00: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
59a5fb0ddb Move headers from EXTRA_DIST to sources, sort alphabetically
There should be no functional difference.
2016-02-21 23:06:48 -08:00
Pavel Roskin
dcab7552db Stop redefining libdir, use moduledir for ${libdir}/xrdp
libdir is for shared and static libraries. Some xrdp libraries are loaded
dynamically from a non-standard directory, so they are used like modules.

Having separate libdir and moduledir would eventually allow to separate
dynamically loaded modules from shared libraries.
2016-02-12 23:52:46 -08:00
Pavel Roskin
f8cb1588ef Replace "charactor" with "character" everywhere 2016-01-30 17:33:04 -08:00
Pavel Roskin
a452d8d36a Merge AM_CFLAGS and INCLUDES info AM_CPPFLAGS
AM_CPPFLAGS is for flags passed to the preprocessor, such as defines and
includes. AM_CFLAGS is for flags affecting the compiler, such as debug
and optimization settings.

INCLUDES is an obsolete name. Users can pass INCLUDES and break
compilation. AM_CPPFLAGS is more explicit that the flags come from
Automake and should not be overridden.
2016-01-29 22:45:00 -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
58f5dcc030 autotools: change top_srcdir to top_builddir for LIBADD 2012-07-13 16:18:02 -07:00
Jay Sorg
31669e4720 update mc interface 2010-12-09 20:41:58 -08:00
Itamar Reis Peixoto
6b08b8b71e include missing files in make dist 2010-11-20 22:13:50 -02: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
23ffdb0c5f autotools fix and file_loc.h simplified 2009-05-19 04:23:49 +00:00
jsorg71
859dc139f0 update copyright year 2009-01-25 02:11:15 +00:00
jsorg71
af83cb7cae remove old makefiles 2008-12-16 02:47:45 +00:00
jsorg71
f77934a58e remove lib version 2008-08-15 02:49:41 +00:00
jsorg71
566aaf6d04 version and common change 2008-08-12 06:09:58 +00:00
jsorg71
59a2d1dea6 build common as a library 2008-08-06 05:06:03 +00:00
jsorg71
dae5aa5d50 autotools 2008-08-03 07:38:36 +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