Commit Graph

1782 Commits

Author SHA1 Message Date
Henrik Andersson
31f99755f7 Fix bug were for loop will always run until break is hit.
When 'i' is an unsigned int, it can never become negative and
stop the for loop iterating over the children.
2017-10-17 10:00:22 +02:00
Henrik Andersson
c99eb954d3 Fix warning about compare of signed and unsigned 2017-10-17 09:56:54 +02:00
Henrik Andersson
036f0fbebe Add UNUSED() macro to silent warnings
Use it to silent warning where a function parameter
is unused.
2017-10-17 09:52:42 +02:00
Henrik Andersson
42f3fad2c3 Add option to build with address-sanitizer 2017-10-17 09:18:07 +02:00
Henrik Andersson
295351792e Merge pull request #174 from derfian/large-pointers
Enable support for large pointers
2017-10-16 20:22:13 +02:00
Karl Mikaelsson
99f5925cce Enable support for large pointers
The cursor-handling code already handles larger pointer sizes. This
advertises that rdesktop has the capability to handle large cursors
and adjusts the maximum size of fragmented packets to suit the large
cursor requirements.

Solves issue #173.
2017-10-16 19:26:30 +02:00
Karl Mikaelsson
276ea5e16b Merge pull request #172 from hean01-cendio/bitmap_compression
Remove global variable g_bitmap_compression
2017-10-16 16:13:26 +02:00
Henrik Andersson
032d67f6ac Remove global variable g_bitmap_compression
g_bitmap_compression is a global variable scattered through the code
but only accessed and used in one place; rdp_out_bitmap_caps().
Demoted it to localvariable and replaced with hardcoded value.
2017-10-16 15:34:47 +02:00
Henrik Andersson
71c3dce37a Merge pull request #171 from derfian/fast-path-fragments
Enable fragmented Fast-Path Updates
2017-10-16 14:42:25 +02:00
Karl Mikaelsson
0c7b4117ab Enable fragmented Fast-Path Updates
Fragmented updates are concatenated into temporary streams (one per
update type) that are processed when receiving an update with the
FASTPATH_FRAGMENT_LAST bit set.
2017-10-16 14:01:13 +02:00
Henrik Andersson
8e3ec9e57b Merge pull request #170 from derfian/system-default-pointer
Use system default pointer when requested
2017-10-16 13:57:59 +02:00
Karl Mikaelsson
b8a1d04ffb Use system default pointer when requested
Solves problem with hidden cursors at login screen (part of
issue #165)

Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
Signed-off-by: Henrik Andersson <hean01@cendio.se>
2017-10-16 13:55:39 +02:00
Henrik Andersson
0e530e6095 Merge pull request #168 from derfian/issue66-ts_fp_update_pdu
Clarify capability sets and Fast-Path code
2017-10-16 12:34:45 +02:00
Karl Mikaelsson
12ee9eb035 Avoid magic constants in caplen too 2017-10-13 14:34:01 +02:00
Karl Mikaelsson
63ac9d3c42 Clarify the Fast-Path handling in the T.123/X.224 layer 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
eec94365c4 Improve Fast-Path code readability
Using constants and field definitions from MS-RDPBCGR.
2017-10-13 14:02:03 +02:00
Karl Mikaelsson
3abeca252b Log system pointer changes via Fast-Path updates 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
72f63d04ec Decipher remaining capabilitysets sent from rdesktop 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
9ca206bc08 Clarify order and bitmap capability set functions 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
3b0a0c1334 Improve rdp_out_general_caps
Rename to rdp_out_ts_general_capabilityset to match the structure
name, describe all fields and use constants instead of magic numbers.
2017-10-13 14:02:03 +02:00
Karl Mikaelsson
e669be67fe Merge pull request #167 from derfian/avoid-smart-card-error-log-entries
Move more Smart Card error messages to the debug level
2017-10-12 10:07:45 +02:00
Karl Mikaelsson
cebd4ad016 Move all Smart Card error messages to the debug level
Running rdesktop with smart card redirection could lead to scenarios
where rdesktop keeps producing error messages about the Smart Card
redirection when there isn't really an error. I don't believe that we
should log an error if the underlying PC/SC interface reports
SCARD_E_NO_SERVICE.

The logged information could be useful for developers in debugging
scenarios, so I'm keeping is as Debug rather than removing it
outright.
2017-10-11 17:24:46 +02:00
Karl Mikaelsson
ae31a05f22 Let Travis build with both GCC and clang, take 2
Last approach didn't work, hopefully this will work better.
2017-10-06 12:54:11 +02:00
Karl Mikaelsson
eb975fcec3 Let Travis compile with both gcc and clang
Catch all the compilation warnings!
2017-10-06 12:44:48 +02:00
Henrik Andersson
43a5f3f054 Merge pull request #166 from uglym8/add_osx_to_travis
Add osx support for Travis CI build
2017-10-06 11:15:14 +02:00
Alexander Zakharov
168566109c Add osx support for Travis CI 2017-10-06 12:06:57 +03:00
Henrik Andersson
ed7e43818f Merge pull request #158 from derfian/maybe-better-audio-sync
rdpsnd_process_ping: include actual packsize value in reply
2017-10-06 10:36:06 +02:00
Henrik Andersson
41b8e1ce06 Merge pull request #160 from derfian/remove-make-proto
Remove infrastructure to auto-generate proto.h
2017-10-06 10:35:36 +02:00
Henrik Andersson
b37122330a Merge pull request #159 from derfian/audio-refactoring-to-spec
Audio refactoring to spec
2017-10-06 10:35:05 +02:00
Henrik Andersson
df038988b6 Merge pull request #162 from uglym8/fix_osx_build
Fix osx build
2017-10-06 09:40:09 +02:00
Alexander Zakharov
ed3726a9fa Handle the lack of SCARD_CTL_CODE on Mac 2017-10-05 19:47:59 +03:00
Alexander Zakharov
f091a38cff Sane way to fix absence of HOST_NAME_MAX on osx 2017-10-05 19:47:50 +03:00
Alexander Zakharov
b71d79cdb1 Add support for Kerberos on Mac 2017-10-05 19:45:03 +03:00
Karl Mikaelsson
1f13c85583 Remove infrastructure to auto-generate proto.h
If proto.h is supposed to be auto-generated it should probably not be
present in the repo at all. Re-running cproto showed that proto.h has
been manually edited for quite some time, so this just makes this the
only workflow.

It also gets rid of a bit of #ifdefs, so that's nice.
2017-10-05 15:18:13 +02:00
Karl Mikaelsson
8316b346e8 Remove accidental packsize reference
This was work done on another branch that got included here by
mistake.
2017-10-05 15:02:01 +02:00
Karl Mikaelsson
e48f947794 Include selected sound driver in the verbose output
This could be somewhat useful for troubleshooting audio, so burying it
in the debug log output is unhelpful.
2017-10-05 14:41:25 +02:00
Karl Mikaelsson
329289ff6c Don't log an error on new audio format handshakes
This happens regularly and it's not an error. An easy way to trigger
this scenario is to let cmd.exe produce a bell sound by tab-completing
something non-existant.
2017-10-05 14:41:25 +02:00
Karl Mikaelsson
7870ef6f86 Refactor rdpsnd to follow to the MS-RDPEA specs more closely
Rename functions and change the constants to match the specification.
2017-10-05 14:41:25 +02:00
Karl Mikaelsson
8cb6bf4e95 rdpsnd_process_ping: include actual packsize value in reply
The rdpsnd_process_ping function did not conform to the MS-RDPEA spec
by leaving out the packsize in the reply. The MS-RDPEA spec is rather
clear that this needs to be the same value as received in the training
request.

I think I'm seeing a slight improvement in audio sync after this
change.
2017-10-05 14:29:44 +02:00
Henrik Andersson
db8b56db44 Merge pull request #156 from derfian/smart-card-logging
Don't log common Smart Card error codes as rdesktop errors
2017-10-05 10:55:30 +02:00
Henrik Andersson
12b28b83d7 Merge pull request #155 from samhed/disconnectreasons
Handle more disconnect reasons
2017-10-05 10:53:43 +02:00
Samuel Mannehed
b89a5899f0 Update man-page with new return codes/texts 2017-10-05 10:45:54 +02:00
Henrik Andersson
0a3a6fbca8 Merge pull request #154 from derfian/fix-disk-logging
Move logging code to after variable declarations
2017-10-05 07:19:55 +02:00
Karl Mikaelsson
dca441c4e6 Don't log warnings/errors from TS_SCardGetStatusChange at all
Not sure why I thought the user needed to see this at all.
2017-10-04 17:11:02 +02:00
Samuel Mannehed
b0813fa275 Add handling for a few special RDP error codes
Most of the RPD protocol errors (reason > 0x1000) would only be
triggered by coding errors in the client. A few of them can occur due
to server errors however. We should attempt to handle these cases.
2017-10-04 16:27:34 +02:00
Samuel Mannehed
e8562507e7 Add handling for connection broker error codes 2017-10-04 15:51:36 +02:00
Samuel Mannehed
e272feaa8a Print the reason code for protocol errors 2017-10-04 15:50:49 +02:00
Karl Mikaelsson
96faa24bd5 Don't log common Smart Card error codes as rdesktop errors
The proper thing to do would be to forward the errors to the server
and let it deal with it. No need to present these as errors to the
user.
2017-10-04 15:20:46 +02:00
Samuel Mannehed
2e744bf54f Indent rdesktop exit codes 2017-10-04 13:21:57 +02:00
Samuel Mannehed
dfad103fd9 Tweak wording of disconnect reason messages
They are now a bit more specific and better match the description of
the disconnection reasons sent by the server.
2017-10-04 12:36:59 +02:00