<dt>--help
</dt>
<dd>Shows program help.
---stop-after-include-error
-Tells <i>ipptool</i> to stop if an error occurs in an included file. Normally <i>ipptool</i> will continue with subsequent tests after the INCLUDE directive.
---version
-Shows the version of <i>ipptool</i> being used.
+</dd>
+<dt>--stop-after-include-error
+</dt>
+<dd>Tells <i>ipptool</i> to stop if an error occurs in an included file. Normally <i>ipptool</i> will continue with subsequent tests after the INCLUDE directive.
+</dd>
+<dt>--version
+</dt>
+<dd>Shows the version of <i>ipptool</i> being used.
</dd>
<dt>-4
</dt>
validate-job.test
</pre>
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
-<a href='man-ipptoolfile.html?TOPIC=Man+Pages'>ipptoolfile(5)</a>,
+<a href='man-ipptoolfile.html?TOPIC=Man+Pages'>ipptoolfile(5)</a>, RFC 2911,
<br>
<a href='http://localhost:631/help'>http://localhost:631/help</a>
+<br>
+<a href='http://www.iana.org/assignments/ipp-registrations'>http://www.iana.org/assignments/ipp-registrations</a>
+<br>
+<a href='http://www.pwg.org/ipp'>http://www.pwg.org/ipp</a>
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright 2007-2013 by Apple Inc.
+Copyright 2007-2014 by Apple Inc.
</body>
</html>
<dt>ATTR tag attribute-name value(s)
</dt>
<dd>Adds an attribute to the test request. Values are separated by the comma (",")
-character - escape commas using the "" character.
+character - escape commas using the "" character. Common attributes and values are listed in the IANA IPP registry - see references below.
</dd>
<dt>ATTR collection attribute-name { MEMBER tag member-name value(s) ... } [ ... { ... } ]
</dt>
</dd>
</dl>
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
-<a href='man-ipptool.html?TOPIC=Man+Pages'>ipptool(1)</a>,
+<a href='man-ipptool.html?TOPIC=Man+Pages'>ipptool(1)</a>, RFC 2911,
<br>
<a href='http://localhost:631/help'>http://localhost:631/help</a>
-
+<br>
+<a href='http://www.iana.org/assignments/ipp-registrations'>http://www.iana.org/assignments/ipp-registrations</a>
+<br>
+<a href='http://www.pwg.org/ipp'>http://www.pwg.org/ipp</a>
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright 2007-2013 by Apple Inc.
+Copyright 2007-2014 by Apple Inc.
</body>
</html>
*
* ipptool command for CUPS.
*
- * Copyright 2007-2013 by Apple Inc.
+ * Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
PassCount = 0, /* Number of passing tests */
FailCount = 0, /* Number of failing tests */
SkipCount = 0; /* Number of skipped tests */
-char *Password = NULL; /* Password from URI */
+static char *Username = NULL, /* Username from URI */
+ *Password = NULL; /* Password from URI */
+static int PasswordTries = 0; /* Number of tries with password */
const char * const URIStatusStrings[] = /* URI status strings */
{
"URI too large",
if ((Password = strchr(vars.userpass, ':')) != NULL)
*Password++ = '\0';
- cupsSetUser(vars.userpass);
+ Username = vars.userpass;
cupsSetPasswordCB(password_cb);
set_variable(&vars, "uriuser", vars.userpass);
}
goto skip_error;
}
+ PasswordTries = 0;
repeat_count = 0;
repeat_interval = 1;
repeat_prev = 1;
{
repeat_count ++;
- status = HTTP_OK;
+ status = HTTP_STATUS_OK;
if (transfer == _CUPS_TRANSFER_CHUNKED ||
(transfer == _CUPS_TRANSFER_AUTO && filename[0]))
repeat_test = 0;
prev_pass = 1;
- if (status != HTTP_ERROR)
+ if (status != HTTP_STATUS_ERROR)
{
while (!response && !Cancel && prev_pass)
{
httpSetField(http, HTTP_FIELD_CONTENT_ENCODING, compression);
#endif /* HAVE_LIBZ */
- if (!Cancel && status == HTTP_CONTINUE &&
+ if (!Cancel && status == HTTP_STATUS_CONTINUE &&
request->state == IPP_DATA && filename[0])
{
if ((reqfile = cupsFileOpen(filename, "r")) != NULL)
(bytes = cupsFileRead(reqfile, buffer,
sizeof(buffer))) > 0)
if ((status = cupsWriteRequestData(http, buffer,
- bytes)) != HTTP_CONTINUE)
+ bytes)) != HTTP_STATUS_CONTINUE)
break;
cupsFileClose(reqfile);
strerror(errno));
_cupsSetError(IPP_INTERNAL_ERROR, buffer, 0);
- status = HTTP_ERROR;
+ status = HTTP_STATUS_ERROR;
}
}
* Get the server's response...
*/
- if (!Cancel && status != HTTP_ERROR)
+ if (!Cancel && status != HTTP_STATUS_ERROR)
{
response = cupsGetResponse(http, resource);
status = httpGetStatus(http);
}
- if (!Cancel && status == HTTP_ERROR && http->error != EINVAL &&
+ if (!Cancel && status == HTTP_STATUS_ERROR && http->error != EINVAL &&
#ifdef WIN32
http->error != WSAETIMEDOUT)
#else
if (httpReconnect(http))
prev_pass = 0;
}
- else if (status == HTTP_ERROR)
+ else if (status == HTTP_STATUS_ERROR || status == HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED)
{
prev_pass = 0;
break;
}
- else if (status != HTTP_OK)
+ else if (status != HTTP_STATUS_OK)
{
httpFlush(http);
}
}
- if (!Cancel && status == HTTP_ERROR && http->error != EINVAL &&
+ if (!Cancel && status == HTTP_STATUS_ERROR && http->error != EINVAL &&
#ifdef WIN32
http->error != WSAETIMEDOUT)
#else
if (httpReconnect(http))
prev_pass = 0;
}
- else if (status == HTTP_ERROR)
+ else if (status == HTTP_STATUS_ERROR)
{
if (!Cancel)
httpReconnect(http);
prev_pass = 0;
}
- else if (status != HTTP_OK)
+ else if (status != HTTP_STATUS_OK)
{
httpFlush(http);
prev_pass = 0;
{
(void)prompt;
- return (Password);
+ if (PasswordTries < 3)
+ {
+ PasswordTries ++;
+
+ cupsSetUser(Username);
+
+ return (Password);
+ }
+ else
+ return (NULL);
}