dnpds40: Don't perform job sanity checks if there is no job!

This commit is contained in:
Solomon Peachy 2015-06-13 12:06:33 -04:00
parent d7e2685a0f
commit c661edaff0
1 changed files with 3 additions and 3 deletions

View File

@ -448,6 +448,9 @@ static int dnpds40_read_parse(void *vctx, int data_fd) {
ctx->datalen += sizeof(struct dnpds40_cmd) + j;
}
if (!ctx->datalen)
return CUPS_BACKEND_CANCEL;
/* Figure out the number of buffers we need. Most only need one. */
if (multicut) {
ctx->buf_needed = 1;
@ -483,9 +486,6 @@ static int dnpds40_read_parse(void *vctx, int data_fd) {
DEBUG("dpi %u matte %u mcut %u bufs %d\n",
dpi, matte, multicut, ctx->buf_needed);
if (!ctx->datalen)
return CUPS_BACKEND_CANCEL;
return CUPS_BACKEND_OK;
}