summaryrefslogtreecommitdiffstats
path: root/backend_mitsud90.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-03-03 19:21:47 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-03-03 19:21:47 -0500
commitd984dca7bcfe702e8ae923610e896cab64f53347 (patch)
tree6b7f1c56063b9598b47fc037e1884364f7f8ef86 /backend_mitsud90.c
parent6a68ac080524645ce15353c5a95c80fe2d0e5689 (diff)
downloadselphy_print-d984dca7bcfe702e8ae923610e896cab64f53347.tar.gz
selphy_print-d984dca7bcfe702e8ae923610e896cab64f53347.tar.bz2
selphy_print-d984dca7bcfe702e8ae923610e896cab64f53347.zip
mitsud90: JOB footer, not PAGE footer!
Diffstat (limited to 'backend_mitsud90.c')
-rw-r--r--backend_mitsud90.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/backend_mitsud90.c b/backend_mitsud90.c
index 74fca32..db4cebc 100644
--- a/backend_mitsud90.c
+++ b/backend_mitsud90.c
@@ -453,6 +453,8 @@ struct mitsud90_printjob {
int m1_colormode;
struct mitsud90_job_hdr hdr;
+
+ int has_footer;
struct mitsud90_job_footer footer;
};
@@ -797,6 +799,7 @@ static int mitsud90_read_parse(void *vctx, const void **vjob, int data_fd, int c
ctx->holdover_on = 1;
// XXX generate a footer!
} else {
+ job->has_footer = 1;
ctx->holdover_on = 0;
}
@@ -1082,9 +1085,11 @@ top:
// sent += (job->datalen - sent);
/* Send job footer */
- if ((ret = send_data(ctx->dev, ctx->endp_down,
- (uint8_t*) &job->footer, sizeof(job->footer))))
- return CUPS_BACKEND_FAILED;
+ if (job->has_footer) {
+ if ((ret = send_data(ctx->dev, ctx->endp_down,
+ (uint8_t*) &job->footer, sizeof(job->footer))))
+ return CUPS_BACKEND_FAILED;
+ }
/* Wait for completion */
do {
@@ -1658,7 +1663,7 @@ static const char *mitsud90_prefixes[] = {
/* Exported */
struct dyesub_backend mitsud90_backend = {
.name = "Mitsubishi CP-D90/CP-M1",
- .version = "0.26" " (lib " LIBMITSU_VER ")",
+ .version = "0.27" " (lib " LIBMITSU_VER ")",
.uri_prefixes = mitsud90_prefixes,
.cmdline_arg = mitsud90_cmdline_arg,
.cmdline_usage = mitsud90_cmdline,