Commit Graph

2019 Commits

Author SHA1 Message Date
Cendio
07abc9bade Defer pending resize until after autoreconnect cookie is received
Resize session using disconnect/reconnect sequence should not be
performed before we have received an auto-reconnect cookie which is
used for reconnecting to the session. There is a race when trying to
reconnect at this point so a defer timer is used to delay this further
from the point where the auto-reconnect cookie is received.

Fixes a problem where a login prompt is shown upon reconnect even if
the auto-reconnect cookie is available and used.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2018-01-31 11:03:32 +01:00
Cendio
e112b69c61 Use proper user-initiated disconnect sequence
A correct user initated disconnect sequence should send
a MCS Disconnect Provider Ultimatum PDU defined in T.128
upon a disconnect. This commit adds the implementation
the mentioned PDU and the actual write of the packet.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
2018-01-31 11:03:32 +01:00
Cendio
293680c034 Use hex constants for data pdu (pdutype2) enumeration
This matches how they're described in MS-RDPBCGR. Also add the proper
constant name as comments.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-31 11:03:32 +01:00
Cendio
37da672908 Added ber_out_sequence() util for writing ASN.1 sequences
Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-31 11:03:32 +01:00
Cendio
bdb92839f3 Add test for Conference Join Request packet creation
Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-31 11:03:32 +01:00
Alexander Zakharov
585f319aea
Merge pull request #237 from shweew/patch-1
Update 'ru' keymap to correct CapsLock handling.
2018-01-30 22:31:38 +03:00
Alexander Zakharov
f7e4195766
Merge pull request #241 from kekePower/gcc730compilationfix
Fix compile issue for "-Werror=format-security" option (e.g. gcc 7.3.0)
2018-01-30 18:24:55 +03:00
kekePower
8376afac54
Fix to compile with GCC 7.3.0 and possibly fix a security issue
Did a google search and found this.
https://stackoverflow.com/questions/4419293/warning-format-not-a-string-literal-and-no-format-arguments/4419319#4419319

With this little fix, rdesktop compiled again using gcc 7.3.0.
2018-01-29 20:35:44 +01:00
Henrik Andersson
54c38f7f62
Merge pull request #240 from rdesktop/fix_issue228
Clear g_exit_mainloop before new connection
2018-01-29 14:10:38 +01:00
Cendio
2491a3c436 Clear g_exit_mainloop before new connection
Reuse of g_exit_mainloop can occur at various situations
such as on redirection, when a new connection is initialized.

If you call rdp_loop with this flag set, things will not work as
you'd expect.

Fixes issue #228

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2018-01-29 14:05:16 +01:00
Dmitriy Shweew
70b3c7c852
Update ru 2018-01-27 09:39:49 +04:00
Karl Mikaelsson
da5153c578
Merge pull request #212 from derfian/rdp-rename-client-and-error-info-pdus
Rename functions that send Client Info PDU and handle Set Error Info PDU
2018-01-25 17:15:22 +01:00
Karl Mikaelsson
2f6cd4df7e Improve handling/code of Set Error Info PDU
Renamed to function to match the PDU it was processing. Removed the
function from proto.h and made it static - there's nothing calling
this from outside of rdp.c. Fixed the logging output to output the
error code instead of the pointer value.
2018-01-25 16:47:17 +01:00
Karl Mikaelsson
ca5c0adefd Rename rdp_send_logon_info to rdp_send_client_info_pdu 2018-01-25 16:47:17 +01:00
Henrik Andersson
cf32cb497a
Merge pull request #211 from uglym8/fix_disk_issues
Fix file sizes for redirected disks
2018-01-24 10:16:39 +01:00
Henrik Andersson
1553760a1e
Merge pull request #232 from rdesktop/dynamic_resize_fixes
Dynamic resize fixes and some refactor
2018-01-11 17:47:35 +01:00
Cendio
a6d82619ee Fix regression introduced in commit 85c10b5
There was either an X11 BadMatch error crash or the
rdesktop main window disappeared when toggling from
window to fullscreen. The bug is consitently
reproducible but only on some systems, maybe this is
a X11 version dependent bug. Move back to old beahavior
were we destroy and recreate the window when toggling
between fullscreen and windowed mode.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
2018-01-11 15:10:05 +01:00
Cendio
1f3d1fb3e0 Refactor handling of user requested window sizes
Extract ui_init_connection() into smaller functions
to clarify purpose.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-11 15:10:05 +01:00
Cendio
884f56a8e7 Fixed failing fullscreen toggle in disconnect/reconnect mode
When starting rdesktop with a fixed window size against W2008R2,
toggling to fullscreen failed to resize window to expected fullscreen
size.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-11 15:10:05 +01:00
Cendio
7f76e2218a Rename of global variable for clarity
Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-11 15:10:05 +01:00
Cendio
bcd676dacc Remove double definition of global variables in test
Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-11 15:10:05 +01:00
Cendio
8ef9f39aa8 Avoid fight about requested session size upon disconnect/reconnect resize.
Move ui_init_connection() outside main loop since it is the source for the
fight of requested session size after a resize reconnect. This should only
be called once for setting up initial requested session size via command
line args.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-11 15:10:05 +01:00
Cendio
ba41f749c6 Refactor g_sizeopt into an enumeration for clarity
Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2018-01-11 15:10:05 +01:00
Cendio
e2f5a7b532 Refactor geometry string parsing
Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2018-01-11 15:10:05 +01:00
Henrik Andersson
85a558a919
Merge pull request #221 from paulmenzel/improve-markup-in-readme.md
Improve markup in `README.md`
2018-01-09 15:34:19 +01:00
Paul Menzel
de290b7fc2 README.md: Mark up parameters and commands 2018-01-03 14:15:30 +01:00
Karl Mikaelsson
15af5e46df
Merge pull request #218 from paulmenzel/improve-configure-help-text
Improve configure help text
2018-01-03 13:50:46 +01:00
Paul Menzel
41eac12a59 configure.ac: Use verb in imperative mood for consistency 2018-01-03 11:42:02 +01:00
Paul Menzel
f3fdda531f configure.ac: Strip trailing spaces 2018-01-03 11:41:07 +01:00
Alexander Zakharov
c58d91c077 Fix file sizes for redirected disks 2017-12-15 20:29:37 +03:00
Karl Mikaelsson
3d9dccbc70
Merge pull request #206 from derfian/dynamic-resize
Dynamic session resize
2017-12-12 12:56:52 +01:00
Cendio
d10df452ee Ensure (partial) resize functionality with automated tests
This test suite was built with cgreen, and has various tests that
tries to ensure that we didn't break something while developing the
dynamic resize feature.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2017-12-07 11:15:03 +01:00
Cendio
85c10b5bc0 Remember window position when toggling fullscreen with RDPEDISP
The rdesktop window used to move to a new position on the screen after
leaving fullscreen. This commit restores the window to the position it
had before entering fullscreen.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2017-12-07 11:15:03 +01:00
Cendio
2be151b328 Always call XRRUpdateConfiguration on root window resize
This fixes a problem where HeightOfScreen and WidthOfScreen returned
old, incorrect sizes after the root window was resized while rdesktop
was not in fullscreen. Calling XRRUpdateConfiguration ensures that the
HeightOfScreen and WidthOfScreen macros return the proper values.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2017-12-07 11:15:03 +01:00
Cendio
ab50ea31cf Implement dynamic session resize
This adds support for resizing the RDP session dynamically based on
the window size. Some complicated logic has been added to avoid
sending excessive amounts of resize requests to the RDP server.

When supported, this resize mechanism should use the RDPEDISP way of
signalling the server to initiate a Deactivate/Activate sequence, but
rdesktop will fall back on Disconnect/Reconnect if RDPEDISP is not
supported by the server.

ui_select has been refactored and most functionality has been broken
out into three new functions, simplifying ui_select into a loop.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2017-12-07 11:15:03 +01:00
Cendio
4ea0e06713 Refactor deactivation of seamless mode
Toggling out of seamless mode is piggy backed on toggle fullscreen.
This introduces a broken behaviour were you get out of seamless mode
and subsequent calls to toggle fullscreen will not take you back.
Just toggle the window between windowed and fullscreen mode.

This refactoring will disable toggle between fullscreen and windowed
mode when rdesktop is started in seamless mode. Still there is a
problem were you can not go back into seamless mode when deactivated.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2017-12-07 10:30:01 +01:00
Henrik Andersson
5961aabc00
Merge pull request #204 from uglym8/allow_short_passwords
Allow single character passwords
2017-12-04 09:03:14 +01:00
Alexander Zakharov
04ebaefede Allow single character passwords 2017-12-01 11:55:06 +03:00
Karl Mikaelsson
1f0b60a405
Merge pull request #203 from uglym8/fix_disk_logging
Fix error format
2017-11-28 14:59:20 +01:00
Alexander Zakharov
948831a3fd Fix error format 2017-11-27 18:03:07 +03:00
Henrik Andersson
45d625b20e
Merge pull request #193 from derfian/mppc-undefined-behavior
Clean up undefined behavior in complicated and/or/shift expression
2017-11-24 09:49:21 +01:00
Henrik Andersson
b5917bc9a2
Merge pull request #152 from hean01-cendio/pulseaudio
Add support for pulseaudio backend
2017-11-24 08:01:01 +01:00
Henrik Andersson
0bc9d7632c
Merge pull request #200 from alexandrevicenzi/ignore_obj
Ignore object files.
2017-11-24 07:53:23 +01:00
Alexandre Vicenzi
4c03af1478 Ignore object files. 2017-11-23 16:19:13 -02:00
Henrik Andersson
93a2ecdc59
Merge pull request #189 from derfian/remove-uiports
Remove uiports
2017-11-15 07:58:40 +01:00
Henrik Andersson
df73c35ca4
Merge pull request #195 from derfian/libao-compiler-warnings
Remove compiler warnings from rdpsnd_libao
2017-11-15 07:57:18 +01:00
Karl Mikaelsson
d6a8f145c4 Remove compiler warnings from rdpsnd_libao
A couple of unused variables and a signed/unsigned fix.
2017-11-13 17:00:53 +01:00
Karl Mikaelsson
43a4c89cef Clean up undefined behavior in complicated and/or/shift expression
Shifting negative values is technically undefined, and we can describe
what we want to do in ways that are easier to read.
2017-11-09 18:46:07 +01:00
Cendio
d037db1086 Increase default desktop size and enable wallpaper 2017-11-09 17:15:16 +01:00
Cendio
d2cbbd46ce Move dvc_hdr_t into dvc.c 2017-11-09 17:03:59 +01:00