--- kdelibs-3.5.7/kdeprint/cups/cupsdconf2/cups-util.c.cups13 2006-10-01 12:33:43.000000000 -0500 +++ kdelibs-3.5.7/kdeprint/cups/cupsdconf2/cups-util.c 2007-07-19 15:12:48.000000000 -0500 @@ -108,7 +108,8 @@ cupsGetConf(void) * See if we should retry the current digest password... */ - if (strncmp(cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0 || + if (strncmp(httpGetField (cups_server, HTTP_FIELD_WWW_AUTHENTICATE), + "Basic", 5) == 0 || digest_tries > 1 || !pwdstring[0]) { /* @@ -116,7 +117,7 @@ cupsGetConf(void) */ snprintf(prompt, sizeof(prompt), "Password for %s on %s? ", cupsUser(), - cups_server->hostname); + cupsServer()); if ((password = cupsGetPassword(prompt)) == NULL) break; @@ -135,7 +136,8 @@ cupsGetConf(void) * Got a password; encode it for the server... */ - if (strncmp(cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0) + if (strncmp(httpGetField (cups_server, HTTP_FIELD_WWW_AUTHENTICATE), + "Basic", 5) == 0) { /* * Basic authentication... @@ -334,7 +336,8 @@ cupsPutConf(const char *name) /* I - Na * See if we should retry the current digest password... */ - if (strncmp(cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0 || + if (strncmp(httpGetField (cups_server, HTTP_FIELD_WWW_AUTHENTICATE), + "Basic", 5) == 0 || digest_tries > 1 || !pwdstring[0]) { /* @@ -342,7 +345,7 @@ cupsPutConf(const char *name) /* I - Na */ snprintf(prompt, sizeof(prompt), "Password for %s on %s? ", cupsUser(), - cups_server->hostname); + cupsServer()); if ((password = cupsGetPassword(prompt)) == NULL) break; @@ -361,7 +364,8 @@ cupsPutConf(const char *name) /* I - Na * Got a password; encode it for the server... */ - if (strncmp(cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Basic", 5) == 0) + if (strncmp(httpGetField (cups_server, HTTP_FIELD_WWW_AUTHENTICATE), + "Basic", 5) == 0) { /* * Basic authentication... --- kdelibs-3.5.7/kdeprint/cups/ipprequest.cpp.cups13 2007-01-15 05:34:19.000000000 -0600 +++ kdelibs-3.5.7/kdeprint/cups/ipprequest.cpp 2007-07-19 15:15:09.000000000 -0500 @@ -309,7 +309,8 @@ bool IppRequest::doFileRequest(const QSt return false; } -#ifdef HAVE_CUPS_NO_PWD_CACHE +#if defined(HAVE_CUPS_NO_PWD_CACHE) && \ + CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 3 strncpy( HTTP->authstring, cups_authstring.data(), HTTP_MAX_VALUE ); #endif @@ -319,7 +320,8 @@ bool IppRequest::doFileRequest(const QSt } request_ = cupsDoFileRequest(HTTP, request_, (res.isEmpty() ? "/" : res.latin1()), (filename.isEmpty() ? NULL : filename.latin1())); -#ifdef HAVE_CUPS_NO_PWD_CACHE +#if defined(HAVE_CUPS_NO_PWD_CACHE) && \ + CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 3 cups_authstring = HTTP->authstring; #endif httpClose(HTTP);