From 59f34097125512208d9e0eaee2b33ba25e5425b7 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Mon, 18 Jun 2018 11:10:50 -0400 Subject: [PATCH] mitsup95: Header fixups need to happen at the end of the parsing. --- backend_mitsup95d.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/backend_mitsup95d.c b/backend_mitsup95d.c index 23556b8..213ae78 100644 --- a/backend_mitsup95d.c +++ b/backend_mitsup95d.c @@ -337,20 +337,21 @@ top: job->datalen += i; } } else if (ptr == job->ftr) { + + /* XXX Update unknown header field to match sniffs */ + if (ctx->type == P_MITSU_P95D) { + if (job->hdr1[18] == 0x00) + job->hdr1[18] = 0x01; + } + + /* Update printjob header to reflect number of requested copies */ + if (job->hdr2[13] != 0xff) + job->hdr2[13] = copies; + *vjob = job; return CUPS_BACKEND_OK; } - /* XXX Update unknown header field to match sniffs */ - if (ctx->type == P_MITSU_P95D) { - if (job->hdr1[18] == 0x00) - job->hdr1[18] = 0x01; - } - - /* Update printjob header to reflect number of requested copies */ - if (job->hdr2[13] != 0xff) - job->hdr2[13] = copies; - goto top; }