mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:50:37 +00:00
winspool.drv: If the call to cupsPrintFile fails, print the cups error message.
Signed-off-by: Jeremy White <jwhite@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a124064ce5
commit
71f018cba5
|
@ -781,13 +781,15 @@ static void *cupshandle;
|
||||||
DO_FUNC(cupsPrintFile)
|
DO_FUNC(cupsPrintFile)
|
||||||
#define CUPS_OPT_FUNCS \
|
#define CUPS_OPT_FUNCS \
|
||||||
DO_FUNC(cupsGetNamedDest); \
|
DO_FUNC(cupsGetNamedDest); \
|
||||||
DO_FUNC(cupsGetPPD3)
|
DO_FUNC(cupsGetPPD3); \
|
||||||
|
DO_FUNC(cupsLastErrorString)
|
||||||
|
|
||||||
#define DO_FUNC(f) static typeof(f) *p##f
|
#define DO_FUNC(f) static typeof(f) *p##f
|
||||||
CUPS_FUNCS;
|
CUPS_FUNCS;
|
||||||
#undef DO_FUNC
|
#undef DO_FUNC
|
||||||
static cups_dest_t * (*pcupsGetNamedDest)(http_t *, const char *, const char *);
|
static cups_dest_t * (*pcupsGetNamedDest)(http_t *, const char *, const char *);
|
||||||
static http_status_t (*pcupsGetPPD3)(http_t *, const char *, time_t *, char *, size_t);
|
static http_status_t (*pcupsGetPPD3)(http_t *, const char *, time_t *, char *, size_t);
|
||||||
|
static const char * (*pcupsLastErrorString)(void);
|
||||||
|
|
||||||
static http_status_t cupsGetPPD3_wrapper( http_t *http, const char *name,
|
static http_status_t cupsGetPPD3_wrapper( http_t *http, const char *name,
|
||||||
time_t *modtime, char *buffer,
|
time_t *modtime, char *buffer,
|
||||||
|
@ -8237,6 +8239,8 @@ static BOOL schedule_cups(LPCWSTR printer_name, LPCWSTR filename, LPCWSTR docume
|
||||||
TRACE( "\t%d: %s = %s\n", i, options[i].name, options[i].value );
|
TRACE( "\t%d: %s = %s\n", i, options[i].name, options[i].value );
|
||||||
|
|
||||||
ret = pcupsPrintFile( queue, unixname, unix_doc_title, num_options, options );
|
ret = pcupsPrintFile( queue, unixname, unix_doc_title, num_options, options );
|
||||||
|
if (ret == 0 && pcupsLastErrorString)
|
||||||
|
WARN("cupsPrintFile failed with error %s\n", debugstr_a(pcupsLastErrorString()));
|
||||||
|
|
||||||
pcupsFreeOptions( num_options, options );
|
pcupsFreeOptions( num_options, options );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue