[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeprint/cups
From:       Dirk Mueller <mueller () kde ! org>
Date:       2007-01-10 10:11:02
Message-ID: 1168423862.445682.20665.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 622015 by mueller:

fix handling of empty printer list with cups 1.2.x
BUG: 115891


 M  +4 -0      ipprequest.cpp  
 M  +2 -2      kmcupsmanager.cpp  


--- trunk/KDE/kdelibs/kdeprint/cups/ipprequest.cpp #622014:622015
@@ -329,6 +329,10 @@
 		dumpRequest(request_, true);
 	}
 
+	/* No printers found */
+	if ( request_ && request_->request.status.status_code == 0x406 )
+		return true;
+
 	if (!request_ || request_->state == IPP_ERROR || (request_->request.status.status_code & 0x0F00))
 		return false;
 
--- trunk/KDE/kdelibs/kdeprint/cups/kmcupsmanager.cpp #622014:622015
@@ -62,7 +62,7 @@
 #define ppdi18n(s)	i18n(QString::fromLocal8Bit(s).toUtf8())
 
 static void extractMaticData(QString& buf, const QString& filename);
-static QString printerURI(KMPrinter *p, bool useExistingURI = false);
+static QString printerURI(KMPrinter *p, bool useExistingURI);
 static QString downloadDriver(KMPrinter *p);
 
 static int trials = 5;
@@ -217,7 +217,7 @@
 	QString		uri;
 
 	req.setOperation(state);
-	uri = printerURI(p);
+	uri = printerURI(p, true);
 	req.addURI(IPP_TAG_OPERATION,"printer-uri",uri);
 	if (req.doRequest("/admin/"))
 		return true;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic