winspool.drv: Fallback to cupsGetPPD if cupsGetPPD3 is missing or failed.

Dmitry Timoshkov dmitry at baikal.ru
Mon Feb 11 00:03:26 CST 2013


---
 dlls/winspool.drv/info.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 60b621e..dbfb64f 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -799,11 +799,19 @@ static http_status_t cupsGetPPD3_wrapper( http_t *http, const char *name,
 {
     const char *ppd;
 
-    if (pcupsGetPPD3) return pcupsGetPPD3( http, name, modtime, buffer, bufsize );
+    if (pcupsGetPPD3)
+    {
+        http_status_t status;
+
+        TRACE( "Calling cupsGetPPD3\n" );
+        status = pcupsGetPPD3( http, name, modtime, buffer, bufsize );
+        if (status == HTTP_OK) return HTTP_OK;
+        TRACE("cupsGetPPD3 failed (status %d)\n", status);
+    }
 
     if (!pcupsGetPPD) return HTTP_NOT_FOUND;
 
-    TRACE( "No cupsGetPPD3 implementation, so calling cupsGetPPD\n" );
+    TRACE( "Calling cupsGetPPD\n" );
 
     *modtime = 0;
     ppd = pcupsGetPPD( name );
-- 
1.8.0.2




More information about the wine-patches mailing list