Commit Graph

61 Commits

Author SHA1 Message Date
Markus Beth
116e125139 Fix memory leaks
The return values of XGetAtomName() have to be freed with XFree().
2019-02-05 22:34:10 +01:00
Alexander Zakharov
85f99edd65 Update copyrights 2019-02-01 11:21:32 +03:00
René Genz
9e99dd52d6 Fix minor spelling mistakes 2017-11-02 01:01:44 +01:00
Henrik Andersson
0d707ae103 Fix sign-compare compiler warnings 2017-10-20 13:30:42 +02: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
Henrik Andersson
87d8d123b8 Rework the logging system
This commit will add a logging system to solve the problem that
one actually need to recompile rdesktop from source to enable
different debug logging.

- Same logging api  for all kind of logging and messages to
   end user.

- Adding -v for verbose output when running rdesktop.

- All messages are logged into a subject and with a type, eg:

     logger(Keyboard, Notice, "Autos-electing %s based on locale.", locale);

- Debug logging is enabled trough a environment variable RDEKSTOP_DEBUG,
  which specifies subjects of interest, comma separated. There is a special
  subject named All which includes all subject for debug loggin. There is also
  a simple logic opeartor '!' = NOT which can be used in combination like:

    RDESKTOP_DEBUG=All,!Graphics,!Sound

  Which would give debug log output for All subject except Graphics and Sound.
2017-01-26 14:19:40 +01:00
Henrik Andersson
2ea3f69873 Raise requirment for iconv to required
This commit changes rdesktop project to require iconv().

Part of issue #89
2017-01-20 08:46:27 +01:00
Alexander Zakharov
48058efcdf Fix double free 2016-11-17 16:16:29 +03:00
Henrik Andersson
cdce9aae75 Run indentation script.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1658 423420c4-83ab-492f-b58f-81f9feb106b5
2012-01-16 06:35:13 +00:00
Henrik Andersson
7457cd9bdd Adds 1 to data length for including the terminating null
character when sending clipboard data to rdp server.

This fixes issue were last character is missing in a
local copy then paste into server session.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1653 423420c4-83ab-492f-b58f-81f9feb106b5
2011-12-21 15:19:56 +00:00
Peter Åstrand
094f3bac04 Fixed style of a few copyright statements.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1635 423420c4-83ab-492f-b58f-81f9feb106b5
2011-09-28 09:36:59 +00:00
Peter Åstrand
b638882347 Include emails in copyright statements.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1615 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 11:13:04 +00:00
Peter Åstrand
27068f53f8 Updated the copyright notices for the things we have been working on.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1612 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 08:55:42 +00:00
Peter Åstrand
281d7c9f06 Changed license to GPLv3
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1534 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-12 08:31:06 +00:00
Jay Sorg
88855ddcbf update the copyright year
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1474 423420c4-83ab-492f-b58f-81f9feb106b5
2008-07-11 03:51:23 +00:00
Peter Åstrand
808a7b09c9 Applied patch #1700909 from Ilya Konstantinov: Linebreak (CR-LF) fixes for clipboard code
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1403 423420c4-83ab-492f-b58f-81f9feb106b5
2007-04-25 12:44:26 +00:00
Michael Gernoth
75fd2e8047 check if there is any data returned from XGetWindowProperty before
calling xclip_send_data_with_convert.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1398 423420c4-83ab-492f-b58f-81f9feb106b5
2007-03-07 15:48:08 +00:00
Michael Gernoth
3dcf92a96b Fixed segfaults in xclip.c:
[1657964] Copy causes segfault by Jos Dehaes
[1664930] Segmentation fault when work with VMWare on remote Windows


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1397 423420c4-83ab-492f-b58f-81f9feb106b5
2007-03-04 11:32:09 +00:00
Jay Sorg
6091381a81 prefix BOOL with RD_
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1371 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-08 04:47:06 +00:00
Jay Sorg
797df4fa02 copyright year update
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1364 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-04 05:39:39 +00:00
Pierre Ossman
6b600842b7 QT sets incorrect types on clipboard properties so we have to accept
everything and hope for the best.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1233 423420c4-83ab-492f-b58f-81f9feb106b5
2006-05-15 11:38:49 +00:00
Peter Åstrand
2d2ba24cdc Compile fixes for GCC 2.96. Fixes 1444824.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1222 423420c4-83ab-492f-b58f-81f9feb106b5
2006-04-09 20:11:42 +00:00
Pierre Ossman
c2c379220f Cut down own the redundant clipboard mode arguments.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1214 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-28 14:46:47 +00:00
Pierre Ossman
b1f202a761 Make sure we notify other rdesktops that we exited so that they can update
their clipboard status.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1213 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-28 13:56:08 +00:00
Pierre Ossman
b48e542deb New race free implementation of the rdesktop-to-rdesktop clipboard protocol.
We now use the property on the root window merely as a way of notifying other
windows that something happend. The actual formats are queried directly from
the current clipboard owner. The new model should be easier to extend with
XFixes support.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1212 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-28 13:24:48 +00:00
Pierre Ossman
91779a2fe3 Examine the magic root window property on startup so that we correctly handle
when another rdesktop owns the clipboard when we start.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1211 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 13:03:27 +00:00
Pierre Ossman
ce69fe16be Handle when server sends a failure back for a clipboard request.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1210 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 12:29:29 +00:00
Pierre Ossman
0732aaa60a Store the time when we acquired the selection so that we can correctly
report it when queried.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1209 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 11:31:10 +00:00
Pierre Ossman
2661541740 Handle when server doesn't give us any clipboard data.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1208 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 11:10:09 +00:00
Pierre Ossman
b9f44e00a8 Reorder construction of the target list so that we do not insert an atom that
isn't yet created. Also make sure that we order targets in order of preference.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1207 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 10:41:22 +00:00
Pierre Ossman
ba2f441f18 Control clipboard behaviour (and even disable it) using command line options.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1206 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 09:20:24 +00:00
Pierre Ossman
2e80d53a30 Examine timestamps of PRIMARY and CLIPBOARD to determine which is more
recent and should therefore be used.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1205 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 08:49:38 +00:00
Pierre Ossman
93cfd505c0 We requested data from CLIPBOARD even though we might be examining the targets
for PRIMARY.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1204 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 08:41:16 +00:00
Pierre Ossman
c13ad01965 Use the helper functions since they make sure the server end flushes its
cache.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1202 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-27 08:39:20 +00:00
Michael Gernoth
276efef2f5 incompatible pointer type warning fixes for iconv-calls
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1049 423420c4-83ab-492f-b58f-81f9feb106b5
2006-03-01 14:16:41 +00:00
Peter Åstrand
ced8a62080 Applied patch from bug #1431217: Segmentation fault in xclip_handle_SelectionNotify.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1047 423420c4-83ab-492f-b58f-81f9feb106b5
2006-02-28 08:09:41 +00:00
Peter Åstrand
d1391ebe17 Indentation fix
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1037 423420c4-83ab-492f-b58f-81f9feb106b5
2006-01-05 11:56:57 +00:00
Erik Forsberg
da3ab666b3 Applied patch [1] with unicode support in clipboard code from Ilya Konstantinov
[1] https://sourceforge.net/tracker/?func=detail&atid=381349&aid=1394324&group_id=24366


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1036 423420c4-83ab-492f-b58f-81f9feb106b5
2006-01-02 15:55:59 +00:00
Peter Åstrand
9ea54ea936 Indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1027 423420c4-83ab-492f-b58f-81f9feb106b5
2005-11-14 14:46:16 +00:00
Erik Forsberg
f7fb2d41e1 Applied patch with comments from Ilya Konstantinov. Closes Patch 1354336.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1026 423420c4-83ab-492f-b58f-81f9feb106b5
2005-11-14 14:11:42 +00:00
Erik Forsberg
8e2ada288e Applied patch from Burt Holzman <burt at fnal gov>, which fixes problems with
the INCR support, used when doing clipboard operations with a lot of data.

With this patch, I can copy and then paste a 32 page document from
oowriter->winword.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1025 423420c4-83ab-492f-b58f-81f9feb106b5
2005-11-09 15:15:28 +00:00
Erik Forsberg
95f19ad209 Applied patch 1349027 by Ilya Konstantinov.
Generalizes code for sending clipboard format announces to RDP side,
and uses new code in appropriate places.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1024 423420c4-83ab-492f-b58f-81f9feb106b5
2005-11-07 13:15:19 +00:00
Peter Åstrand
0663d2ad33 Surround public functions requiring X11 headers with #ifndef
MAKE_PROTO; these are in xproto.h, which is not generated by cproto.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@941 423420c4-83ab-492f-b58f-81f9feb106b5
2005-08-02 09:27:46 +00:00
Peter Åstrand
d134716beb Indent fixes.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@940 423420c4-83ab-492f-b58f-81f9feb106b5
2005-08-02 09:19:24 +00:00
Michael Gernoth
dc915d3d62 Compile fix for older GCCs from Nikolai V. Ivanyushin <nvi@sven.ru>
(Move declaration of variable to start of function)


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@939 423420c4-83ab-492f-b58f-81f9feb106b5
2005-07-30 08:39:06 +00:00
Michael Gernoth
5f2ebd9f0f fix compiler warning on Mac OS/X:
pointer targets in passing argument differ in signedness


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@913 423420c4-83ab-492f-b58f-81f9feb106b5
2005-06-27 21:57:04 +00:00
Peter Åstrand
27acca1127 Support the clipboard INCR protocol: Applied patch from Burt Holzman.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@912 423420c4-83ab-492f-b58f-81f9feb106b5
2005-06-27 12:18:48 +00:00
Erik Forsberg
115960e2cb Don't advertise UTF8_STRING. Use STRING instead. This gives much
better interoperability between MS Word and Star/OpenOffice when it
comes to highbit characters (åäö and friends).


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@706 423420c4-83ab-492f-b58f-81f9feb106b5
2004-06-04 08:42:11 +00:00
Peter Åstrand
731c8164a2 Indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@607 423420c4-83ab-492f-b58f-81f9feb106b5
2004-02-15 21:19:28 +00:00
Michael Gernoth
6a1b00fcb9 Cleanup some warnings (from SUNWspro-compiler)
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@601 423420c4-83ab-492f-b58f-81f9feb106b5
2004-02-07 17:32:21 +00:00