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
aea5d3d1
Commit
aea5d3d1
authored
Sep 27, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Sep 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Check the return results from schedule_* functions.
parent
cdfb393d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
info.c
dlls/winspool.drv/info.c
+11
-10
No files found.
dlls/winspool.drv/info.c
View file @
aea5d3d1
...
...
@@ -7574,6 +7574,7 @@ static BOOL schedule_lpr(LPCWSTR printer_name, LPCWSTR filename)
char
*
unixname
,
*
queue
,
*
cmd
;
char
fmt
[]
=
"lpr -P%s %s"
;
DWORD
len
;
int
r
;
if
(
!
(
unixname
=
wine_get_unix_file_name
(
filename
)))
return
FALSE
;
...
...
@@ -7586,12 +7587,12 @@ static BOOL schedule_lpr(LPCWSTR printer_name, LPCWSTR filename)
sprintf
(
cmd
,
fmt
,
queue
,
unixname
);
TRACE
(
"printing with: %s
\n
"
,
cmd
);
system
(
cmd
);
r
=
system
(
cmd
);
HeapFree
(
GetProcessHeap
(),
0
,
cmd
);
HeapFree
(
GetProcessHeap
(),
0
,
queue
);
HeapFree
(
GetProcessHeap
(),
0
,
unixname
);
return
TRUE
;
return
(
r
==
0
)
;
}
/*****************************************************************************
...
...
@@ -7714,10 +7715,11 @@ static BOOL schedule_file(LPCWSTR filename)
if
(
get_filename
(
&
output
))
{
BOOL
r
;
TRACE
(
"copy to %s
\n
"
,
debugstr_w
(
output
));
CopyFileW
(
filename
,
output
,
FALSE
);
r
=
CopyFileW
(
filename
,
output
,
FALSE
);
HeapFree
(
GetProcessHeap
(),
0
,
output
);
return
TRUE
;
return
r
;
}
return
FALSE
;
}
...
...
@@ -7869,23 +7871,23 @@ BOOL WINAPI ScheduleJob( HANDLE hPrinter, DWORD dwJobID )
}
if
(
output
[
0
]
==
'|'
)
{
schedule_pipe
(
output
+
1
,
job
->
filename
);
ret
=
schedule_pipe
(
output
+
1
,
job
->
filename
);
}
else
if
(
output
[
0
])
{
schedule_unixfile
(
output
,
job
->
filename
);
ret
=
schedule_unixfile
(
output
,
job
->
filename
);
}
else
if
(
!
strncmpW
(
pi5
->
pPortName
,
LPR_Port
,
strlenW
(
LPR_Port
)))
{
schedule_lpr
(
pi5
->
pPortName
+
strlenW
(
LPR_Port
),
job
->
filename
);
ret
=
schedule_lpr
(
pi5
->
pPortName
+
strlenW
(
LPR_Port
),
job
->
filename
);
}
else
if
(
!
strncmpW
(
pi5
->
pPortName
,
CUPS_Port
,
strlenW
(
CUPS_Port
)))
{
schedule_cups
(
pi5
->
pPortName
+
strlenW
(
CUPS_Port
),
job
->
filename
,
job
->
document_title
);
ret
=
schedule_cups
(
pi5
->
pPortName
+
strlenW
(
CUPS_Port
),
job
->
filename
,
job
->
document_title
);
}
else
if
(
!
strncmpW
(
pi5
->
pPortName
,
FILE_Port
,
strlenW
(
FILE_Port
)))
{
schedule_file
(
job
->
filename
);
ret
=
schedule_file
(
job
->
filename
);
}
else
{
...
...
@@ -7899,7 +7901,6 @@ BOOL WINAPI ScheduleJob( HANDLE hPrinter, DWORD dwJobID )
HeapFree
(
GetProcessHeap
(),
0
,
job
->
document_title
);
HeapFree
(
GetProcessHeap
(),
0
,
job
->
filename
);
HeapFree
(
GetProcessHeap
(),
0
,
job
);
ret
=
TRUE
;
break
;
}
end
:
...
...
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