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

List:       kde-commits
Subject:    KDE_3_2_BRANCH: kdelibs/kdeprint/cups
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2004-03-03 16:58:05
Message-ID: 20040303165805.A4C969910 () office ! kde ! org
[Download RAW message or body]

CVS commit by goffioul: 

Quick workaround for authentication problem appeared with cups-1.1.20 (backport)


  M +6 -0      configure.in.in   1.2.4.1
  M +16 -0     ipprequest.cpp   1.29.2.1


--- kdelibs/kdeprint/cups/configure.in.in  #1.2:1.2.4.1
@@ -18,2 +18,8 @@
 fi
 
+dnl check if CUPS is at least 1.1.20
+ac_have_new_cups="no"
+AC_CHECK_CUPS_VERSION(1.0120)
+if test "$ac_have_new_cups" = "yes"; then
+        AC_DEFINE(HAVE_CUPS_NO_PWD_CACHE, 1, CUPS doesn't have password caching)
+fi

--- kdelibs/kdeprint/cups/ipprequest.cpp  #1.29:1.29.2.1
@@ -30,4 +30,13 @@
 #include <cups/cups.h>
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_CUPS_NO_PWD_CACHE
+#include <qcstring.h>
+static QCString cups_authstring = "";
+#endif
+
 void dumpRequest(ipp_t *req, bool answer = false, const QString& s = QString::null)
 {
@@ -301,4 +310,8 @@ bool IppRequest::doFileRequest(const QSt
         }
 
+#ifdef HAVE_CUPS_NO_PWD_CACHE
+        strncpy( HTTP->authstring, cups_authstring.data(), HTTP_MAX_VALUE );
+#endif
+
         if (dump_ > 0)
         {
@@ -307,4 +320,7 @@ bool IppRequest::doFileRequest(const QSt
 
         request_ = cupsDoFileRequest(HTTP, request_, (res.isEmpty() ? "/" : \
res.latin1()), (filename.isEmpty() ? NULL : filename.latin1())); +#ifdef \
HAVE_CUPS_NO_PWD_CACHE +        cups_authstring = HTTP->authstring;
+#endif
         httpClose(HTTP);
 


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

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