summaryrefslogtreecommitdiff
path: root/backend/sp15c.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
commitee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch)
tree58f05092be1a17a939e861f8cadcda1b6ca2ecef /backend/sp15c.c
parent0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff)
parentfef76e17ed4c607ea73b81279f9ef1d7121be900 (diff)
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'backend/sp15c.c')
-rw-r--r--backend/sp15c.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/backend/sp15c.c b/backend/sp15c.c
index 0cabed8..20b2c80 100644
--- a/backend/sp15c.c
+++ b/backend/sp15c.c
@@ -1,4 +1,3 @@
-static const char RCSid[] = "$Header$";
/* sane - Scanner Access Now Easy.
This file is part of the SANE package.
@@ -313,7 +312,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
{
struct sp15c *dev;
int i;
-
+
local_only = local_only; /* silence compilation warnings */
DBG (10, "sane_get_devices\n");
@@ -392,7 +391,7 @@ sane_open (SANE_String_Const name, SANE_Handle * handle)
SANE_Status
sane_set_io_mode (SANE_Handle h, SANE_Bool non_blocking)
{
- h = h;
+ h = h;
non_blocking = non_blocking; /* silence compilation warnings */
DBG (10, "sane_set_io_mode\n");
@@ -989,7 +988,7 @@ sane_exit (void)
free (dev->buffer);
free (dev);
}
-
+
if (devlist)
free (devlist);
} /* sane_exit */
@@ -1322,7 +1321,7 @@ static SANE_Status
sp15c_do_inquiry (struct sp15c *s)
{
static SANE_Status ret;
-
+
DBG (10, "do_inquiry\n");
memset (s->buffer, '\0', 256); /* clear buffer */
@@ -1606,7 +1605,7 @@ sp15c_free_scanner (struct sp15c *s)
if (ret)
return ret;
#endif
-
+
wait_scanner (s);
ret = do_scsi_cmd (s->sfd, release_unitB.cmd, release_unitB.size, NULL, 0);
@@ -1626,7 +1625,7 @@ sp15c_free_scanner (struct sp15c *s)
* GOOD
* RESERVE UNIT
* GOOD
- *
+ *
* It is then responsible for installing appropriate signal handlers
* to call emergency_give_scanner() if user aborts.
*/
@@ -1647,7 +1646,7 @@ sp15c_grab_scanner (struct sp15c *s)
return 0;
} /* sp15c_grab_scanner */
-/*
+/*
* wait_scanner spins until TEST_UNIT_READY returns 0 (GOOD)
* returns 0 on success,
* returns -1 on error or timeout
@@ -1770,7 +1769,7 @@ do_cancel (struct sp15c *scanner)
sanei_thread_kill (scanner->reader_pid);
DBG (50, "wait for scanner to stop\n");
sanei_thread_waitpid (scanner->reader_pid, &exit_status);
- scanner->reader_pid = -1;
+ sanei_thread_invalidate (scanner->reader_pid);
}
if (scanner->sfd >= 0)
@@ -1788,7 +1787,7 @@ static void
swap_res (struct sp15c *s)
{
s = s; /* silence compilation warnings */
-
+
/* for the time being, do nothing */
} /* swap_res */
@@ -1820,7 +1819,7 @@ sp15c_set_window_param (struct sp15c *s, int prescan)
int active_buffer_size;
prescan = prescan; /* silence compilation warnings */
-
+
wait_scanner (s);
DBG (10, "set_window_param\n");
memset (buffer_r, '\0', WDB_size_max); /* clear buffer */
@@ -1979,7 +1978,7 @@ reader_process (void *data)
DBG (10, "reader_process started\n");
- if (sanei_thread_is_forked ())
+ if (sanei_thread_is_forked ())
close (scanner->pipe);
sigfillset (&ignore_set);