[sane-devel] [PATCH v2 09/14] net, re-use sane_set_io_mode

Ruediger Meier sweet_f_a at gmx.de
Mon Jan 23 23:05:54 UTC 2012


From: Ruediger Meier <ruediger.meier at ga-group.nl>

Now we have only one place where we could implement "turning off
non-blocking I/O"  platform dependent.
---
 backend/net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/backend/net.c b/backend/net.c
index f3800d9..5946a1b 100644
--- a/backend/net.c
+++ b/backend/net.c
@@ -2209,7 +2209,7 @@ sane_read (SANE_Handle handle, SANE_Byte * data, SANE_Int max_length,
 	  DBG (2, "sane_read: received error signal\n");
 
 	  /* turn off non-blocking I/O (s->data will be closed anyhow): */
-	  fcntl (s->data, F_SETFL, 0);
+	  sane_set_io_mode (s, SANE_FALSE);
 
 	  /* read the status byte: */
 	  if (read (s->data, &ch, sizeof (ch)) != 1)
-- 
1.7.6.1




More information about the sane-devel mailing list