hiti: set HITI_NODATA in the environment to disable data table sends

o
This commit is contained in:
Solomon Peachy 2022-10-29 10:27:51 -04:00
parent 7fc8ba7088
commit f753005e7e
1 changed files with 7 additions and 0 deletions

View File

@ -455,6 +455,7 @@ struct hiti_ctx {
struct dyesub_connection *conn;
int jobid;
int nodata;
char serno[32];
@ -1005,6 +1006,9 @@ static void *hiti_init(void)
}
memset(ctx, 0, sizeof(struct hiti_ctx));
if (getenv("HITI_NODATA")) {
ctx->nodata = 1;
}
return ctx;
}
@ -1544,6 +1548,9 @@ static int hiti_send_heat_data(struct hiti_ctx *ctx, uint8_t mode, uint8_t matte
int ret, len;
if (ctx->nodata)
return CUPS_BACKEND_OK;
fname = hiti_get_heat_file(ctx, mode);
if (!fname) {