projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
febd02c
)
Force close clipboard files
author
akallabeth
<akallabeth@posteo.net>
Fri, 26 Mar 2021 10:21:27 +0000
(11:21 +0100)
committer
akallabeth
<akallabeth@users.noreply.github.com>
Tue, 25 May 2021 13:30:50 +0000
(15:30 +0200)
(cherry picked from commit
781c764dfda8876a8b49288c2fef01cfe1173a7f
)
winpr/libwinpr/clipboard/posix.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/clipboard/posix.c
b/winpr/libwinpr/clipboard/posix.c
index
540815e
..
b278491
100644
(file)
--- a/
winpr/libwinpr/clipboard/posix.c
+++ b/
winpr/libwinpr/clipboard/posix.c
@@
-835,7
+835,9
@@
UINT posix_file_read_close(struct posix_file* file, BOOL force)
if (file->fd < 0)
return NO_ERROR;
- if ((file->offset >= file->size) || force)
+ /* Always force close the file. Clipboard might open hundreds of files
+ * so avoid caching to prevent running out of available file descriptors */
+ if ((file->offset >= file->size) || force || TRUE)
{
WLog_VRB(TAG, "close file %d", file->fd);