@@ -3849,6 +3849,7 @@ ippfile_attr_cb(
38493849 "job-settable-attributes-supported" ,
38503850 "job-sheets-default" ,
38513851 "job-sheets-supported" ,
3852+ "max-page-ranges-supported" ,
38523853 "media-col-supported" ,
38533854 "multiple-document-handling-supported" ,
38543855 "multiple-document-jobs-supported" ,
@@ -3863,6 +3864,8 @@ ippfile_attr_cb(
38633864 "notify-max-events-supported" ,
38643865 "notify-pull-method-supported" ,
38653866 "operations-supported" ,
3867+ "overrides-supported" ,
3868+ "page-ranges-supported" ,
38663869 "pdl-override-supported" ,
38673870 "preferred-attributes-supported" ,
38683871 "printer-alert" ,
@@ -4344,6 +4347,10 @@ load_legacy_attributes(
43444347 // finishings-supported
43454348 ippAddInteger (attrs , IPP_TAG_PRINTER , IPP_TAG_ENUM , "finishings-supported" , IPP_FINISHINGS_NONE );
43464349
4350+ // max-page-ranges-supported
4351+ if (!ippFindAttribute (attrs , "max-page-ranges-supported" , IPP_TAG_ZERO ) && cupsArrayFind (docformats , (void * )"application/pdf" ))
4352+ ippAddInteger (attrs , IPP_TAG_PRINTER , IPP_TAG_INTEGER , "max-page-ranges-supported" , 1 );
4353+
43474354 // media-bottom-margin-supported
43484355 if (ppm_color > 0 )
43494356 ippAddIntegers (attrs , IPP_TAG_PRINTER , IPP_TAG_INTEGER , "media-bottom-margin-supported" , (int )(sizeof (media_bottom_margin_supported ) / sizeof (media_bottom_margin_supported [0 ])), media_bottom_margin_supported );
@@ -6208,15 +6215,23 @@ register_printer(
62086215 if (!cupsDNSSDServiceAdd (printer -> services , "_http._tcp,_printer" , /*domain*/ NULL , printer -> hostname , (uint16_t )printer -> port , num_txt , txt ))
62096216 goto error ;
62106217
6218+ // Commit it...
6219+ if (!cupsDNSSDServicePublish (printer -> services ))
6220+ goto error ;
6221+
6222+ fprintf (stderr , "Registered printer '%s' for discovery using DNS-SD.\n" , printer -> dnssd_name );
6223+
62116224 cupsFreeOptions (num_txt , txt );
62126225
6213- // Commit it...
6214- return (cupsDNSSDServicePublish (printer -> services ));
6226+ return (true);
62156227
62166228 // If we get here there was a problem...
62176229 error :
62186230
6231+ fprintf (stderr , "Unable to register printer '%s' for discovery using DNS-SD: %s\n" , printer -> dnssd_name , cupsGetErrorString ());
6232+
62196233 cupsFreeOptions (num_txt , txt );
6234+
62206235 return (false);
62216236}
62226237
0 commit comments