diff --git a/ChangeLog b/ChangeLog index c10daf6db..0571ae6f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-24 Julien Blache + * backend/net.c: do not reload options behind the frontend's back + in sane_control_option; rather return SANE_STATUS_INVAL and warn + that the frontend is buggy. + 2008-06-22 Julien Blache * frontend/saned.c: terminate child processes before exiting in debug mode. diff --git a/backend/net.c b/backend/net.c index 86137f4b4..276b216ef 100644 --- a/backend/net.c +++ b/backend/net.c @@ -1691,16 +1691,10 @@ sane_control_option (SANE_Handle handle, SANE_Int option, if (!s->options_valid) { - DBG (3, "sane_control_option: getting option descriptors\n"); - status = fetch_options (s); - if (status != SANE_STATUS_GOOD) - { - DBG (1, "sane_control_option: fetch_options failed (%s)\n", - sane_strstatus (status)); - - return status; - } + DBG (1, "sane_control_option: FRONTEND BUG: option descriptors reload needed\n"); + return SANE_STATUS_INVAL; } + if (((SANE_Word) option >= s->opt.num_options) || (option < 0)) { DBG (1, "sane_control_option: invalid option number\n");