diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2009-01-23 22:36:42 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2009-01-23 22:36:42 +0000 |
commit | d1c13e168660dfc384ead2efe29eb20a7abc5950 (patch) | |
tree | af85fff369a6092b78c7e3c694784cd7207f1c1c /scheduler/dirsvc.c | |
parent | d2354e63977f1d0386a8d5724db2ec90fb666824 (diff) | |
download | cups-d1c13e168660dfc384ead2efe29eb20a7abc5950.tar.gz |
Merge changes from CUPS 1.4svn-r8290.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1144 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/dirsvc.c')
-rw-r--r-- | scheduler/dirsvc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c index d51f54630..54749128a 100644 --- a/scheduler/dirsvc.c +++ b/scheduler/dirsvc.c @@ -3,7 +3,7 @@ * * Directory services routines for the Common UNIX Printing System (CUPS). * - * Copyright 2007-2008 by Apple Inc. + * Copyright 2007-2009 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -283,7 +283,7 @@ cupsdLoadRemoteCache(void) { cups_file_t *fp; /* remote.cache file */ int linenum; /* Current line number */ - char line[1024], /* Line from file */ + char line[4096], /* Line from file */ *value, /* Pointer to value */ *valueptr, /* Pointer into value */ scheme[32], /* Scheme portion of URI */ @@ -2217,6 +2217,7 @@ dnssdBuildTxtRecord( rp_str[1024], /* Queue name string buffer */ air_str[1024], /* auth-info-required string buffer */ *keyvalue[32][2]; /* Table of key/value pairs */ + ipp_attribute_t *air_attr; /* auth-info-required attribute */ /* @@ -2326,12 +2327,14 @@ dnssdBuildTxtRecord( keyvalue[i ][0] = "pdl"; keyvalue[i++][1] = p->pdl ? p->pdl : "application/postscript"; - if (p->num_auth_info_required) + if ((air_attr = ippFindAttribute(p->attrs, "auth-info-required", + IPP_TAG_KEYWORD)) != NULL && + strcmp(air_attr->values[0].string.text, "none")) { char *air = air_str; /* Pointer into string */ - for (j = 0; j < p->num_auth_info_required; j ++) + for (j = 0; j < air_attr->num_values; j ++) { if (air >= (air_str + sizeof(air_str) - 2)) break; @@ -2339,7 +2342,8 @@ dnssdBuildTxtRecord( if (j) *air++ = ','; - strlcpy(air, p->auth_info_required[j], sizeof(air_str) - (air - air_str)); + strlcpy(air, air_attr->values[j].string.text, + sizeof(air_str) - (air - air_str)); air += strlen(air); } |