Commit Graph

170 Commits

Author SHA1 Message Date
Armin Novak b8a709ccda [client,x11] fixed file clipboard cache
if files are pasted in different file-browser (or e.g. xclip is used)
the data was retrieved in wrong format.
2023-02-21 16:42:54 +01:00
Armin Novak 1522b5aa91 xx 2023-02-21 16:42:54 +01:00
Armin Novak fe3de9b9bf [client,x11] log fuse_session_loop errors 2023-02-21 16:42:54 +01:00
Armin Novak 68d3bcb99a [clipboard] remove linux specifics from channels/cliprdr.h 2023-02-21 16:42:54 +01:00
Armin Novak 10bf44c112 [client,x11] use fuse_root_id 2023-02-21 16:42:54 +01:00
Armin Novak ded270e167 [client,x11] fix fuse file list reset 2023-02-21 16:42:54 +01:00
Armin Novak 9b174c50c9 [client,x11] add fuse debug messages 2023-02-21 16:42:54 +01:00
Armin Novak d694733106 [client,x11] fix fuse detection and use 2023-02-21 16:42:54 +01:00
Armin Novak 9218a404b5 [client,x11] force initial format list 2022-12-03 10:53:18 +01:00
akallabeth 5799fb2018 Replace ConvertFromUnicode and ConvertToUnicode
* Use new ConvertUtf8ToWChar, ConvertUtf8NToWChar,
  ConvertUtf8ToWCharAlloc and ConvertUtf8NToWCharAlloc
* Use new ConvertWCharToUtf8, ConvertWCharNToUtf8,
  ConvertWCharToUtf8Alloc and ConvertWCharNToUtf8Alloc
* Use new Stream UTF16 to/from UTF8 read/write functions
* Use new settings UTF16 to/from UTF8 read/write functions
2022-11-28 10:42:36 +01:00
xiaopengzhou@hotmail.com 34afe6b23e Fix Format List PDU is not sent when the Clipboard Redirection Virtual Channel is initialized for the second time. (X11 client) 2022-10-18 09:14:21 +02:00
akallabeth 43c5289928 Replaced memset/ZeroMemory with initializer
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
akallabeth 1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
Armin Novak 8561b08592 Fixed gnome and mate clipboard format synthesizers 2022-09-13 14:42:33 +02:00
Pascal Nowack 6492a00959 client/X11: Relieve CLIPRDR filename restriction when possible
Microsoft Windows imposes strict filename restrictions on its platform.
As RDP is developed by Microsoft and the RDS in MS Windows is typically
used as remote desktop server for the RDP protocol, these filename
restrictions are also enforced in WinPR, when copy-pasting files over
the clipboard.
However, in some connections no peer on MS Windows is involved and in
these situations, these filename restrictions are just an annoyance.

With a recent API addition in WinPR, it is now possible to override the
callback, where the filename is checked, whether it is valid.
So, use this new API to relieve the filename restriction, when the
connected remote desktop server is not on MS Windows.
2022-07-07 07:45:26 +00:00
akallabeth 9a2a37786e Refactored clipboard structs 2022-07-04 14:31:08 +02:00
akallabeth fbe1075a30 Fixed xfreerdp clipboard resource cleanup 2022-06-23 14:19:50 +02:00
akallabeth 6bc7f6ca88 Fixed cast-qual warnings 2022-04-28 12:37:19 +02:00
akallabeth 962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
akallabeth ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth 667b471686 Fixed cast-quality warnings 2022-04-28 09:17:20 +02:00
akallabeth 73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
Pascal Nowack e68897a694 X11/cliprdr: Clear selection requests, when they become invalid
When a FormatDataRequest by xfreerdp is answered with the
CB_RESPONSE_FAIL flag, then the request was answered, but xfreerdp does
not mark it as answered, by leaving the request as pending.
This results in non-functional copy-paste actions, when copying
something from the server side, after the failed request.
A similar situation can happen, when a new FormatList is received,
while there is a pending FormatDataRequest.

Fix these situations by clearing the pending request, when a form of an
answer, either via CB_RESPONSE_FAIL flag or via new FormatList, is
received.

Fixes: https://github.com/FreeRDP/FreeRDP/issues/7757
2022-03-29 13:39:07 +02:00
akallabeth 3d38d2636c Decreased logging verbosity for INFO level 2022-03-04 09:34:02 +01:00
Armin Novak 4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
akallabeth 7641710f60 Use a client/common context component
* Allows moving common client code from specific client to a
  generic client/common implementation
2022-02-22 09:44:13 +01:00
akallabeth 8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
akallabeth 4a4d783d4f
Moved clipboard custom context checks to implementation (#7501) 2021-12-17 13:47:20 +01:00
jackyzy823 90b1b3d540 x11: Add size in xf_cliprdr_fuse_getattr resopnse 2021-11-25 12:24:50 +01:00
Armin Novak 673fb46836 Fixed uninitialized warnings 2021-09-10 08:16:25 +02:00
Armin Novak 5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
akallabeth 8d82adb28a Fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak 216f65336e Fixed HashTable and ArrayList use errors 2021-06-16 11:46:42 +02:00
Armin Novak c2bef2bfa9 Fixed return value checks for ArrayList_Append and HashTable_Insert 2021-06-16 11:46:42 +02:00
Armin Novak d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak 880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00
Armin Novak cb642699c8 Modified HashTable API to be opaque
* Reuse wObject function pointers
* Add missing getters/setters
* Clean up return types, const correctness of arguments
2021-06-16 11:46:42 +02:00
akallabeth 6b36c6d417
Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
akallabeth 9f573a1b40 Fixed #6938: Remote app mode clipboard fix
In remote app mode the _FREERDP_TIMESTAMP_PROPERTY does not work.
Therefore ignore it
2021-04-16 11:18:00 +02:00
Armin Novak 1fa0b80f7f Removed nautilus clipboard file hack
This prevents remote to properly paste text
2021-03-10 15:48:58 +01:00
Armin Novak df785f7b77 Refactored X11 clipboard 2021-03-10 15:48:58 +01:00
akallabeth 1dae0552d7 Fixed various warnings 2021-02-16 16:28:57 +01:00
akallabeth a51f4ccaaa Filter out duplicate ClientFormatList announcements 2021-01-25 10:34:11 +01:00
akallabeth 2efb7d9274 Fixed sending of clipboard format request response
If a request was pending and new formats were announced the response
to a ServerFormatDataRequest was never sent.
2021-01-25 10:32:50 +01:00
akallabeth f3dad4106a Fixed support for huge files in clipboard 2021-01-25 08:43:46 +01:00
akallabeth 4ca2090f03 Return ENOENT if fuse_ino_t is not found 2021-01-18 19:13:56 +01:00
Armin Novak 78435c2eea Added missing errno.h include 2021-01-18 19:13:56 +01:00
jackyzy823 b972d70a9e x11: refactor fuse code 2021-01-18 19:13:56 +01:00
jackyzy823 7f043ebb52 x11: update cmake file to build with fuse2/fuse3 or without fuse 2021-01-18 19:13:56 +01:00