kopia lustrzana https://gitlab.com/sane-project/backends
Explicitely check for errors on fds
Previous code checked for no activity (!POLLIN) and would error out with 2 fds and only one active.merge-requests/1/head
rodzic
504547028b
commit
161ca93aa5
|
@ -1,3 +1,7 @@
|
|||
2009-08-08 Julien Blache <jb@jblache.org>
|
||||
- frontend/saned.c: run_standalone(), explicitely check for errors
|
||||
on fds.
|
||||
|
||||
2009-08-07 m. allan noah <kitno455 at gmail dot com>
|
||||
* backend/fujitsu.[ch], backend/fujitsu-scsi.h: Backend v96
|
||||
- split sane_get_parameters into two functions
|
||||
|
|
|
@ -3106,7 +3106,7 @@ run_standalone (int argc, char **argv)
|
|||
for (i = 0, fdp = fds; i < nfds; i++, fdp++)
|
||||
{
|
||||
/* Error on an fd */
|
||||
if (! (fdp->revents & POLLIN))
|
||||
if (fdp->revents & (POLLERR | POLLHUP | POLLNVAL))
|
||||
{
|
||||
for (i = 0, fdp = fds; i < nfds; i++, fdp++)
|
||||
close (fdp->fd);
|
||||
|
|
Ładowanie…
Reference in New Issue