To determine whether the PDF filter (usually cfFilterPDFToPDF()) has
to do the page logging for CUPS ("PAGE: XX YY" log messages) or the
driver filter, we check the final output type (FINAL_CONTENT_TYPE
environment cariable from CUPS) to see whether a driver filter is
involved which should log the pages by itself.
The code to compare the final output type with the "*cupsFilter(2):
..." lines in the PPD file was broken, which is fixed with this
commit.
while (!isspace(*p)) p ++;
while (isspace(*p)) p ++;
}
- if (!strncasecmp(data->final_content_type, p,
- strlen(data->final_content_type))) {
+ if (strlen(p) >= strlen(data->final_content_type) &&
+ !strncasecmp(data->final_content_type, p,
+ strlen(data->final_content_type)) &&
+ !isalnum(p[strlen(data->final_content_type)])) {
break;
}
}