diff options
author | Vincent Untz <vuntz@novell.com> | 2010-02-16 19:15:42 +0100 |
---|---|---|
committer | Vincent Untz <vuntz@novell.com> | 2010-02-16 19:15:42 +0100 |
commit | 591b8a42ae17992132a270b1fe6cc720117fb91f (patch) | |
tree | f7de44a68a8e46b80b0de91ffe3f263caae428ab /src | |
parent | 3aa766b8c1952252913d5891cb0fb4567df7f448 (diff) |
Respect the schemes when getting devices with pre cups 1.4 code
Diffstat (limited to 'src')
-rw-r--r-- | src/cups.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1991,6 +1991,24 @@ cph_cups_devices_get (CphCups *cups, ippAddInteger (request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "limit", limit); + if (include_schemes && len_include > 0) { + int i; + + attr = ippAddStrings (request, IPP_TAG_OPERATION, IPP_TAG_NAME, + "include-schemes", len_include, NULL, NULL); + for (i = 0; i < len_include; i++) + attr->values[i].string.text = g_strdup (include_schemes[i]); + } + + if (exclude_schemes && len_exclude > 0) { + int i; + + attr = ippAddStrings (request, IPP_TAG_OPERATION, IPP_TAG_NAME, + "exclude-schemes", len_exclude, NULL, NULL); + for (i = 0; i < len_exclude; i++) + attr->values[i].string.text = g_strdup (exclude_schemes[i]); + } + resource_char = _cph_cups_get_resource (CPH_RESOURCE_ROOT); reply = cupsDoRequest (cups->priv->connection, request, resource_char); |