From 2f4c0c16c40c5b1524a4829cc7d314c939eaf0fb Mon Sep 17 00:00:00 2001 From: Rolf Bensch Date: Mon, 10 Aug 2015 23:19:58 +0200 Subject: [PATCH] EOF is a bjnp timeout error --- backend/pixma_io_sanei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/pixma_io_sanei.c b/backend/pixma_io_sanei.c index 995999ca3..9e4a2fa81 100644 --- a/backend/pixma_io_sanei.c +++ b/backend/pixma_io_sanei.c @@ -575,7 +575,8 @@ pixma_wait_interrupt (pixma_io_t * io, void *buf, unsigned size, int timeout) #endif error = map_error (sanei_usb_read_int (io->dev, buf, &count)); } - if (error == PIXMA_EIO /*|| error == PIXMA_EOF*/) /* EOF isn't an error! */ + if (error == PIXMA_EIO || + (io->interface == INT_BJNP && error == PIXMA_EOF)) /* EOF is a bjnp timeout error! */ error = PIXMA_ETIMEDOUT; /* FIXME: SANE doesn't have ETIMEDOUT!! */ if (error == 0) error = count;