From f753005e7e79553b9365077a59cb6aa81a403f30 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sat, 29 Oct 2022 10:27:51 -0400 Subject: [PATCH] hiti: set HITI_NODATA in the environment to disable data table sends o --- backend_hiti.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend_hiti.c b/backend_hiti.c index 429c2c4..d6097ce 100644 --- a/backend_hiti.c +++ b/backend_hiti.c @@ -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) {