Commit Graph

93 Commits

Author SHA1 Message Date
akallabeth 1956fffd3d [build,mingw] fix build issues found 2024-04-03 11:53:58 +02:00
Armin Novak ff92ef4331 [client,windows] clean up clipboard 2024-04-03 10:45:12 +02:00
Ilya Shipitsin be50010d1d client/Windows/wf_cliprdr.c: handle malloc error 2024-04-03 10:45:12 +02:00
akallabeth d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +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
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
2fly2 7e8986325c fix can not copy file after last copy
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-20 11:56:35 +02:00
2fly2 afd28494a2 fix copy 0 size file on windows
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-20 11:56:35 +02:00
2fly2 880a82e97b fix connection abort when copy from remote wordpad, local windows 10, open local clipboard history in settings
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-19 14:13:08 +02:00
akallabeth 9a2a37786e Refactored clipboard structs 2022-07-04 14:31:08 +02: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 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
Armin Novak 0d79670a28 Fixed missing input checks for file contents request
reported by Valentino Ricotta (Thalium)
2021-07-22 15:10:18 +02:00
Armin Novak 5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Biswapriyo Nath 173ab04b59 Use same data types as calling function prototypes. 2021-05-31 13:38:19 +02:00
swadical 09dedf1a1f [windows client] [cliprdr] Translate clientside format IDs to serverside format IDs in cl->sv data request 2021-02-22 10:37:34 +01:00
akallabeth cbee45aace Fixed clipboard 'called with invalid type' warning 2020-05-06 13:31:57 +02:00
xie.kunming 979798f51c wf_cliprdr.c forget OleUninitialize if create_cliprdr_window failed 2020-03-02 11:45:45 +01:00
Armin Novak b89fd2d8e5 Fix #5749: Retry to open the clipboard.
On windows the clipboard is shared and other applications
or windows might lock the clipboard.
For this reason, retry opening if it fails and ignore
failure to open during normal operation.
2019-11-26 07:57:32 +01:00
Armin Novak 72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak 12b0b9ea28 Do not use named events, they are global! 2019-09-02 15:28:31 +02:00
akallabeth 0a8ebcfcac
Merge pull request #5187 from astrand/mingw-part1
Mingw build fixes part1
2019-01-29 10:46:21 +01:00
Armin Novak 087390b303 Refactored client clipboard function callbacks for const data pointers. 2019-01-23 16:55:13 +01:00
Peter Åstrand (astrand) 30cd1ba1ab Use lowercase for includes and libs
Makes build possible on case sensitive systems such as MinGW on Linux.
2019-01-09 09:36:28 +01:00
Ilya Shipitsin 4403448a77 client/Windows/wf_cliprdr.c: remove redundant check
found by cppcheck

[client/Windows/wf_cliprdr.c:2556] -> [client/Windows/wf_cliprdr.c:2561]: (warning) Identical condition '!clipboard', second condition is always false
2019-01-07 22:55:08 +05:00
Armin Novak 1398fa5b27 Fixed missing NULL check for thread handle. 2018-12-04 09:34:22 +01:00
Armin Novak c5512de269 Fix #4999: Increase reference count 2018-12-04 09:34:22 +01:00
Armin Novak a2cd934184 Fixed windows build warnings. 2018-11-15 09:01:53 +01:00
Armin Novak 2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak 0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
Ilya Shipitsin 52cb79a60b remove redundant assignment
[client/Windows/wf_cliprdr.c:575]: (warning) Redundant assignment of 'clipboard' to itself.
2017-01-30 15:09:36 +05:00
Ilya Shipitsin 12f5368819 make cppcheck even more happier:
[channels/tsmf/client/gstreamer/tsmf_X11.c:317] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:322]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:470] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/gstreamer/tsmf_X11.c:472] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:475]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
[channels/tsmf/client/tsmf_media.c:179] -> [channels/tsmf/client/tsmf_media.c:181]: (warning) Either the condition '!stream' is redundant or there is possible null pointer dereference: stream.
[client/Windows/wf_cliprdr.c:2219] -> [client/Windows/wf_cliprdr.c:2222]: (warning) Either the condition '!formatDataResponse' is redundant or there is possible null pointer dereference: formatDataResponse
[client/Windows/wf_cliprdr.c:2445] -> [client/Windows/wf_cliprdr.c:2448]: (warning) Either the condition '!fileContentsResponse' is redundant or there is possible null pointer dereference: fileContentsResponse.
[client/X11/xf_cliprdr.c:911] -> [client/X11/xf_cliprdr.c:913]: (warning) Either the condition '!clipboard' is redundant or there is possible null pointer dereference: clipboard.
[client/X11/xf_graphics.c:504] -> [client/X11/xf_graphics.c:506]: (warning) Either the condition '!xfc' is redundant or there is possible null pointer dereference: xfc.
[libfreerdp/core/transport.c:861] -> [libfreerdp/core/transport.c:863]: (warning) Either the condition '!transport' is redundant or there is possible null pointer dereference: transport.
[server/shadow/shadow_server.c:777] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:778] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:779] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:781] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:782] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:783] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:784] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:785] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:787] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
[server/shadow/shadow_server.c:789] -> [server/shadow/shadow_server.c:791]: (warning) Either the condition '!server' is redundant or there is possible null pointer dereference: server.
2017-01-26 14:44:19 +05:00
jcrespo-asg d1ece92b95 windows fix: cliprdr_send_format_list format name 2017-01-11 14:29:48 +01:00
Norbert Federa f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak 943e295714 WLog using C99 compatible variadic macros. 2016-10-07 14:05:27 +02:00
Armin Novak 71a73068ec Reformatted client code. 2016-10-06 13:43:06 +02:00
Marc-André Moreau 0d1553942e wfreerdp: fix Windows XP clipboard missing imports 2016-03-30 10:31:34 -04:00
Armin Novak b4dbe23d91 Fixed mixed declaration. 2015-10-27 10:44:32 +01:00
Armin Novak 57c90eacc6 Fixed clipboard format for directory copy. 2015-10-27 10:44:32 +01:00
Armin Novak 5de53096ed Fixed directory copy from remote to local. 2015-10-27 10:44:32 +01:00
Armin Novak d5385471a5 Disabled file locking, added response checks. 2015-10-27 10:44:32 +01:00
Armin Novak 34191cdafc Fixed clipboard file transfer. 2015-10-27 10:44:32 +01:00
Martin Haimberger 52405a3e79 Remove WIN32ERROR type
All return values are UINT now.
2015-08-27 05:38:20 -07:00
Martin Haimberger 6e4e1c2773 Merge remote-tracking branch 'upstream/master' into mh-stream-fix
Conflicts:
	client/Windows/wf_cliprdr.c
2015-06-18 03:06:40 -07:00
Martin Haimberger e5d5cd3c94 hardend cliprdr
hardend cliprdr server and client
also updated all callbacks in the server and client
implementations
2015-06-18 03:04:31 -07:00
Norbert Federa 87683ec87b client/windows: invalid usage of S_FALSE HRESULT
S_FALSE is a success code and not an error (note the S_)
2015-06-03 16:06:01 +02:00
Norbert Federa 77769f10b6 winpr: fixed HRESULT & SCODE types, added a ctest
- HRESULT was unsigned which means that until now all usages of the
  SUCCEDED(hr) and FAILED(hr) macros never detected any errors
- Also fixed the (unused) SCODE typedef
- Added new ctest TestTypes
2015-06-02 19:52:52 +02:00
Norbert Federa 1eff1a345e free can handle NULL perfectly fine 2015-05-11 09:07:39 +02:00