dnpds40: Don't allow BUFCNTRL on DS80D when not using roll media.

This commit is contained in:
Solomon Peachy 2015-08-28 20:49:31 -04:00
parent ac59030199
commit be1fc6a46f
1 changed files with 9 additions and 4 deletions

View File

@ -990,10 +990,15 @@ static int dnpds40_main_loop(void *vctx, int copies) {
snprintf(buf, sizeof(buf), "%08d", 1);
if (ctx->buffctrl_offset) {
memcpy(ctx->buffctrl_offset, buf, 8);
} else { // XXX disable on DS80D if mcut >= 100
dnpds40_build_cmd(&cmd, "CNTRL", "BUFFCNTRL", 8);
if ((ret = dnpds40_do_cmd(ctx, &cmd, (uint8_t*)buf, 8)))
return CUPS_BACKEND_FAILED;
} else {
/* DS80D does not support BUFFCNTRL when using
cut media; all others support this */
if (ctx->type != P_DNP_DS80D ||
ctx->multicut < 100) {
dnpds40_build_cmd(&cmd, "CNTRL", "BUFFCNTRL", 8);
if ((ret = dnpds40_do_cmd(ctx, &cmd, (uint8_t*)buf, 8)))
return CUPS_BACKEND_FAILED;
}
}
}