kopia lustrzana https://gitlab.com/sane-project/backends
Correctly set O_NONBLOCK flag and disallow further reception using shutdown on saned data fd once a connection is open.
rodzic
fd7b83c8f7
commit
7df77203ad
|
@ -2256,8 +2256,8 @@ process_request (Wire * w)
|
||||||
strerror (errno));
|
strerror (errno));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
fcntl (data_fd, F_SETFL, 1); /* set non-blocking */
|
fcntl (data_fd, F_SETFL, O_NONBLOCK); /* set non-blocking */
|
||||||
shutdown (data_fd, 0);
|
shutdown (data_fd, SHUT_RD);
|
||||||
do_scan (w, h, data_fd);
|
do_scan (w, h, data_fd);
|
||||||
close (data_fd);
|
close (data_fd);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue