kopia lustrzana https://gitlab.com/sane-project/backends
pixma_mp[150|810]: disable send_time()
The function send_time() makes trouble with a lot of scanners. We send a warning to the debug output instead of sending the time. fix for [#315248] Canon MP250 with pixma backend is not workingmerge-requests/1/head
rodzic
b040b150a0
commit
0f47b47b75
|
@ -828,6 +828,7 @@ query_status (pixma_t * s)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int
|
static int
|
||||||
send_time (pixma_t * s)
|
send_time (pixma_t * s)
|
||||||
{
|
{
|
||||||
|
@ -847,6 +848,7 @@ send_time (pixma_t * s)
|
||||||
PDBG (pixma_dbg (3, "Sending time: '%s'\n", (char *) data));
|
PDBG (pixma_dbg (3, "Sending time: '%s'\n", (char *) data));
|
||||||
return pixma_exec (s, &mp->cb);
|
return pixma_exec (s, &mp->cb);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* TODO: Simplify this function. Read the whole data packet in one shot. */
|
/* TODO: Simplify this function. Read the whole data packet in one shot. */
|
||||||
static int
|
static int
|
||||||
|
@ -972,7 +974,10 @@ handle_interrupt (pixma_t * s, int timeout)
|
||||||
{
|
{
|
||||||
/* More than one event can be reported at the same time. */
|
/* More than one event can be reported at the same time. */
|
||||||
if (buf[3] & 1)
|
if (buf[3] & 1)
|
||||||
|
/* FIXME: This function makes trouble with a lot of scanners
|
||||||
send_time (s);
|
send_time (s);
|
||||||
|
*/
|
||||||
|
PDBG (pixma_dbg (1, "WARNING:send_time() disabled!\n"));
|
||||||
if (buf[9] & 2)
|
if (buf[9] & 2)
|
||||||
query_status (s);
|
query_status (s);
|
||||||
if (buf[0] & 2)
|
if (buf[0] & 2)
|
||||||
|
|
|
@ -1009,6 +1009,7 @@ static int query_status (pixma_t * s)
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int send_time (pixma_t * s)
|
static int send_time (pixma_t * s)
|
||||||
{
|
{
|
||||||
/* Why does a scanner need a time? */
|
/* Why does a scanner need a time? */
|
||||||
|
@ -1025,6 +1026,7 @@ static int send_time (pixma_t * s)
|
||||||
PDBG(pixma_dbg (3, "Sending time: '%s'\n", (char *) data));
|
PDBG(pixma_dbg (3, "Sending time: '%s'\n", (char *) data));
|
||||||
return pixma_exec (s, &mp->cb);
|
return pixma_exec (s, &mp->cb);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* TODO: Simplify this function. Read the whole data packet in one shot. */
|
/* TODO: Simplify this function. Read the whole data packet in one shot. */
|
||||||
static int read_image_block (pixma_t * s, uint8_t * header, uint8_t * data)
|
static int read_image_block (pixma_t * s, uint8_t * header, uint8_t * data)
|
||||||
|
@ -1157,7 +1159,10 @@ static int handle_interrupt (pixma_t * s, int timeout)
|
||||||
{
|
{
|
||||||
/* More than one event can be reported at the same time. */
|
/* More than one event can be reported at the same time. */
|
||||||
if (buf[3] & 1)
|
if (buf[3] & 1)
|
||||||
send_time (s); /* FIXME: some scanners hang here */
|
/* FIXME: This function makes trouble with a lot of scanners
|
||||||
|
send_time (s);
|
||||||
|
*/
|
||||||
|
PDBG (pixma_dbg (1, "WARNING:send_time() disabled!\n"));
|
||||||
if (buf[9] & 2)
|
if (buf[9] & 2)
|
||||||
query_status (s);
|
query_status (s);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue