kopia lustrzana https://gitlab.com/sane-project/backends
pixma_bjnp.c pixma_bjnp_private.h: set minimum timeout for network operations to 500ms
rodzic
affe1ac821
commit
4b2f171a13
|
@ -2182,8 +2182,15 @@ sanei_bjnp_deactivate (SANE_Int dn)
|
||||||
extern void
|
extern void
|
||||||
sanei_bjnp_set_timeout (SANE_Int devno, SANE_Int timeout)
|
sanei_bjnp_set_timeout (SANE_Int devno, SANE_Int timeout)
|
||||||
{
|
{
|
||||||
PDBG (bjnp_dbg (LOG_INFO, "bjnp_set_timeout to %d\n",
|
if (timeout < BJNP_TIMEOUT_MIN)
|
||||||
|
{
|
||||||
|
PDBG (bjnp_dbg (LOG_INFO, "bjnp_set_timeout to %d, but using minimum value %d\n",
|
||||||
|
timeout, BJNP_TIMEOUT_MIN));
|
||||||
|
timeout = BJNP_TIMEOUT_MIN;
|
||||||
|
} else {
|
||||||
|
PDBG (bjnp_dbg (LOG_INFO, "bjnp_set_timeout to %d\n",
|
||||||
timeout));
|
timeout));
|
||||||
|
}
|
||||||
|
|
||||||
device[devno].bjnp_timeout = timeout;
|
device[devno].bjnp_timeout = timeout;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
/* timers */
|
/* timers */
|
||||||
#define BJNP_BROADCAST_INTERVAL 10 /* ms between broadcasts */
|
#define BJNP_BROADCAST_INTERVAL 10 /* ms between broadcasts */
|
||||||
#define BJNP_BC_RESPONSE_TIMEOUT 500 /* waiting time for broadc. responses */
|
#define BJNP_BC_RESPONSE_TIMEOUT 500 /* waiting time for broadc. responses */
|
||||||
|
#define BJNP_TIMEOUT_MIN 500 /* minimum tiemout value for network operations */
|
||||||
#define BJNP_USLEEP_MS 1000 /* sleep for 1 msec */
|
#define BJNP_USLEEP_MS 1000 /* sleep for 1 msec */
|
||||||
|
|
||||||
/* retries */
|
/* retries */
|
||||||
|
|
Ładowanie…
Reference in New Issue