Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e687ebd3
Commit
e687ebd3
authored
Nov 30, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Return error if cups port handle is used from different threads.
parent
b09f8714
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
localmon.c
dlls/localspl/localmon.c
+17
-0
No files found.
dlls/localspl/localmon.c
View file @
e687ebd3
...
...
@@ -66,6 +66,7 @@ typedef struct {
struct
list
entry
;
DWORD
type
;
HANDLE
hfile
;
DWORD
thread_id
;
INT64
doc_handle
;
WCHAR
nameW
[
1
];
}
port_t
;
...
...
@@ -516,6 +517,8 @@ static BOOL WINAPI localmon_StartDocPort(HANDLE hport, WCHAR *printer_name,
if
(
port
->
doc_handle
)
return
TRUE
;
port
->
thread_id
=
GetCurrentThreadId
();
params
.
type
=
port
->
type
;
params
.
port
=
port
->
nameW
;
params
.
document_title
=
doc_info
?
doc_info
->
pDocName
:
NULL
;
...
...
@@ -561,6 +564,13 @@ static BOOL WINAPI localmon_WritePort(HANDLE hport, BYTE *buf, DWORD size,
return
FALSE
;
}
if
(
port
->
type
==
PORT_IS_CUPS
&&
port
->
thread_id
!=
GetCurrentThreadId
())
{
FIXME
(
"used from other thread
\n
"
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
params
.
doc
=
port
->
doc_handle
;
params
.
buf
=
buf
;
params
.
size
=
size
;
...
...
@@ -585,6 +595,13 @@ static BOOL WINAPI localmon_EndDocPort(HANDLE hport)
if
(
!
port
->
doc_handle
)
return
TRUE
;
if
(
port
->
type
==
PORT_IS_CUPS
&&
port
->
thread_id
!=
GetCurrentThreadId
())
{
FIXME
(
"used from other thread
\n
"
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
params
.
doc
=
port
->
doc_handle
;
port
->
doc_handle
=
0
;
return
UNIX_CALL
(
end_doc
,
&
params
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment