hiti: Fix incorrect data accounting if we retry a plane.

This commit is contained in:
Solomon Peachy 2022-10-01 21:31:22 -04:00
parent 1e908e0422
commit 89700f105f
1 changed files with 5 additions and 4 deletions

View File

@ -2154,7 +2154,6 @@ resend_y:
if (ret)
return CUPS_BACKEND_FAILED;
__usleep(200*1000);
sent += rows * cols;
ret = hiti_query_status(ctx, sts, &err);
if (ret)
return ret;
@ -2167,6 +2166,7 @@ resend_y:
WARNING("Printer requested resend\n");
goto resend_y;
}
sent += rows * cols;
resend_m:
INFO("Sending magenta plane\n");
@ -2179,7 +2179,6 @@ resend_m:
ret = send_data(ctx->conn, job->databuf + sent, rows * cols);
if (ret)
return CUPS_BACKEND_FAILED;
sent += rows * cols;
__usleep(200*1000);
ret = hiti_query_status(ctx, sts, &err);
if (ret)
@ -2193,6 +2192,7 @@ resend_m:
WARNING("Printer requested resend\n");
goto resend_m;
}
sent += rows * cols;
resend_c:
INFO("Sending cyan plane\n");
@ -2206,7 +2206,7 @@ resend_c:
if (ret)
return CUPS_BACKEND_FAILED;
__usleep(200*1000);
sent += rows * cols;
ret = hiti_query_status(ctx, sts, &err);
if (ret)
return ret;
@ -2219,6 +2219,7 @@ resend_c:
WARNING("Printer requested resend\n");
goto resend_c;
}
sent += rows * cols;
INFO("Sending Print start\n");
ret = hiti_docmd(ctx, CMD_EPC_EP, NULL, 0, &resplen);
@ -2720,7 +2721,7 @@ static const char *hiti_prefixes[] = {
const struct dyesub_backend hiti_backend = {
.name = "HiTi Photo Printers",
.version = "0.43",
.version = "0.44",
.uri_prefixes = hiti_prefixes,
.cmdline_usage = hiti_cmdline,
.cmdline_arg = hiti_cmdline_arg,