/*
- * "$Id: ipp.c 10102 2011-11-02 23:52:39Z mike $"
+ * "$Id$"
*
* Internet Printing Protocol functions for CUPS.
*
* needed. The formatted string is truncated as needed to the maximum length of
* the corresponding value type.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
ipp_attribute_t * /* O - New attribute */
* stdarg pointer @code ap@. The formatted string is truncated as needed to the
* maximum length of the corresponding value type.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
ipp_attribute_t * /* O - New attribute */
group == IPP_TAG_END || group >= IPP_TAG_UNSUPPORTED_VALUE ||
(value_tag < IPP_TAG_TEXT && value_tag != IPP_TAG_TEXTLANG &&
value_tag != IPP_TAG_NAMELANG) || value_tag > IPP_TAG_MIMETYPE ||
- !format || !ap)
+ !format)
return (NULL);
if ((value_tag == IPP_TAG_TEXTLANG || value_tag == IPP_TAG_NAMELANG)
* enum value, or the value falls within one of the rangeOfInteger values for
* the attribute.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
int /* O - 1 on a match, 0 on no match */
* Returns non-zero when the attribute contains a matching charset, keyword,
* language, mimeMediaType, name, text, URI, or URI scheme value.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
int /* O - 1 on a match, 0 on no match */
* The @code element@ parameter specifies which value to get from 0 to
* @link ippGetCount(attr)@ - 1.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
void * /* O - Pointer to octetString data */
* Set default version - usually 2.0...
*/
+ if (cg->server_version == 0)
+ _cupsSetDefaults();
+
temp->request.any.version[0] = cg->server_version / 10;
temp->request.any.version[1] = cg->server_version % 10;
temp->use = 1;
* "utf-8" and a value derived from the current locale are substituted,
* respectively.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
ipp_t * /* O - IPP response message */
* The @code element@ parameter specifies which value to set from 0 to
* @link ippGetCount(attr)@.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
int /* O - 1 on success, 0 on failure */
* needed. The formatted string is truncated as needed to the maximum length of
* the corresponding value type.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
int /* O - 1 on success, 0 on failure */
* needed. The formatted string is truncated as needed to the maximum length of
* the corresponding value type.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
int /* O - 1 on success, 0 on failure */
if (!ipp || !attr || !*attr ||
(value_tag < IPP_TAG_TEXT && value_tag != IPP_TAG_TEXTLANG &&
value_tag != IPP_TAG_NAMELANG) || value_tag > IPP_TAG_MIMETYPE ||
- !format || !ap)
+ !format)
return (0);
/*
* value tag. 1 is returned if the attribute is valid, 0 otherwise. On
* failure, cupsLastErrorString() is set to a human-readable message.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
int /* O - 1 if valid, 0 otherwise */
* attribute. Like @link ippValidateAttribute@, cupsLastErrorString() is set
* to a human-readable message on failure.
*
- * @since CUPS 1.7@
+ * @since CUPS 1.7/OS X 10.9@
*/
int /* O - 1 if valid, 0 otherwise */
}
/*
- * If blocking is disabled, stop here...
+ * If blocking is disabled and we aren't at the end of the attribute
+ * list, stop here...
*/
- if (!blocking)
+ if (!blocking && ipp->current)
break;
}
/*
- * End of "$Id: ipp.c 10102 2011-11-02 23:52:39Z mike $".
+ * End of "$Id$".
*/