Commit 07090031 authored by Jérémy BUCHOU's avatar Jérémy BUCHOU

Merge branch 'wip-sane_cancel' into 'master'

Sane: sane_cancel() must always be called at the end of all scans, even if the...

See merge request !30
parents c90ba4b2 40b00998
Pipeline #83333 passed with stage
in 42 minutes and 30 seconds
......@@ -1120,6 +1120,7 @@ static enum lis_error lis_sane_scan_start(struct lis_item *self,
sane_err);
private->session.end_of_page = 1;
private->session.end_of_feed = 1;
sane_cancel(private->handle);
return LIS_OK;
}
lis_log_info("Sane: scan_start() OK");
......@@ -1184,6 +1185,7 @@ static enum lis_error lis_sane_scan_read(
lis_log_warning("sane_start() returned EOF (%d) --> No document in the feeder",
sane_err);
private->end_of_feed = 1;
sane_cancel(private->item->handle);
return LIS_OK;
}
......@@ -1197,6 +1199,7 @@ static enum lis_error lis_sane_scan_read(
lis_log_warning("sane_start() failed: 0x%X, %s (assuming end of feed)",
err, lis_strerror(err));
private->end_of_feed = 1;
sane_cancel(private->item->handle);
}
return LIS_OK;
case SANE_STATUS_NO_DOCS:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment