/*
- * "$Id: request.c 7460 2008-04-16 02:19:54Z mike $"
+ * "$Id: request.c 7946 2008-09-16 23:27:54Z mike $"
*
* IPP utilities for the Common UNIX Printing System (CUPS).
*
while (response == NULL)
{
- DEBUG_puts("cupsDoFileRequest: setup...");
+ DEBUG_puts("cupsDoIORequest: setup...");
/*
* Send the request...
status = cupsSendRequest(http, request, resource, length);
- DEBUG_printf(("cupsDoFileRequest: status=%d\n", status));
+ DEBUG_printf(("cupsDoIORequest: status=%d\n", status));
if (status == HTTP_CONTINUE && request->state == IPP_DATA && infile >= 0)
{
- DEBUG_puts("cupsDoFileRequest: file write...");
+ DEBUG_puts("cupsDoIORequest: file write...");
/*
* Send the file with the request...
request ? ippOpString(request->request.op.operation_id) : "?",
resource ? resource : "(null)"));
- return (cupsDoFileRequest(http, request, resource, NULL));
+ return (cupsDoIORequest(http, request, resource, -1, -1));
}
if (ippFindAttribute(request, "auth-info", IPP_TAG_TEXT) &&
!httpAddrLocalhost(http->hostaddr) && !http->tls &&
httpEncryption(http, HTTP_ENCRYPT_REQUIRED))
+ {
+ _cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0);
return (HTTP_SERVICE_UNAVAILABLE);
+ }
#endif /* HAVE_SSL */
/*
if (!strcasecmp(http->fields[HTTP_FIELD_CONNECTION], "close"))
if (httpReconnect(http))
+ {
+ _cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0);
return (HTTP_SERVICE_UNAVAILABLE);
+ }
/*
* Loop until we can send the request without authorization problems.
if (httpPost(http, resource))
{
if (httpReconnect(http))
+ {
+ _cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0);
return (HTTP_SERVICE_UNAVAILABLE);
+ }
else
continue;
}
case HTTP_UNAUTHORIZED :
if (!cupsDoAuthentication(http, "POST", resource))
if (httpReconnect(http))
- return (HTTP_ERROR);
+ {
+ _cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0);
+ return (HTTP_SERVICE_UNAVAILABLE);
+ }
return (status);
*/
if (httpReconnect(http))
- return (HTTP_ERROR);
+ {
+ _cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0);
+ return (HTTP_SERVICE_UNAVAILABLE);
+ }
httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
/*
- * End of "$Id: request.c 7460 2008-04-16 02:19:54Z mike $".
+ * End of "$Id: request.c 7946 2008-09-16 23:27:54Z mike $".
*/