summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-01-13 20:43:03 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-01-13 20:43:03 -0500
commitc23fe56eaa776b0ca2706d6c38cc32104af405b4 (patch)
tree7834607eab84ad7d4cda1c0cccdc5c3cb1031363
parent6fe8aad9ee515dc7c0d114c6a48a694121874187 (diff)
downloadselphy_print-c23fe56eaa776b0ca2706d6c38cc32104af405b4.tar.gz
selphy_print-c23fe56eaa776b0ca2706d6c38cc32104af405b4.tar.bz2
selphy_print-c23fe56eaa776b0ca2706d6c38cc32104af405b4.zip
hiti: Fix incorrect copy accounting
-rw-r--r--backend_hiti.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/backend_hiti.c b/backend_hiti.c
index 4958adf..cd7f460 100644
--- a/backend_hiti.c
+++ b/backend_hiti.c
@@ -1534,7 +1534,6 @@ static int hiti_main_loop(void *vctx, const void *vjob)
struct hiti_ctx *ctx = vctx;
int ret;
- int copies;
uint32_t err = 0;
uint8_t sts[3];
struct hiti_job jobid;
@@ -1546,9 +1545,6 @@ static int hiti_main_loop(void *vctx, const void *vjob)
if (!job)
return CUPS_BACKEND_FAILED;
- copies = job->copies;
-
-top:
INFO("Waiting for printer idle\n");
do {
@@ -1602,7 +1598,7 @@ top:
sf.rows_offset = calc_offset(ctx->calibration.vert, 5, 8, 4);
sf.cols_offset = calc_offset(ctx->calibration.horiz, 6, 11, 4);
sf.colorSeq = 0x87 + (job->hdr.overcoat ? 0xc0 : 0);
- sf.copies = copies;
+ sf.copies = job->copies;
sf.printMode = 0x08 + (job->hdr.quality ? 0x02 : 0);
ret = hiti_docmd(ctx, CMD_EFD_SF, (uint8_t*) &sf, sizeof(sf), &resplen);
if (ret)
@@ -1757,15 +1753,7 @@ resend_c:
}
} while(1);
- /* Clean up */
- if (terminate)
- copies = 1;
-
- INFO("Print complete (%d copies remaining)\n", copies - 1);
-
- if (copies && --copies) {
- goto top;
- }
+ INFO("Print complete\n");
return CUPS_BACKEND_OK;
}
@@ -2182,7 +2170,7 @@ static const char *hiti_prefixes[] = {
struct dyesub_backend hiti_backend = {
.name = "HiTi Photo Printers",
- .version = "0.17",
+ .version = "0.18",
.uri_prefixes = hiti_prefixes,
.cmdline_usage = hiti_cmdline,
.cmdline_arg = hiti_cmdline_arg,