summaryrefslogtreecommitdiff
path: root/scan/sane/sclpml.c
diff options
context:
space:
mode:
Diffstat (limited to 'scan/sane/sclpml.c')
-rw-r--r--scan/sane/sclpml.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/scan/sane/sclpml.c b/scan/sane/sclpml.c
index 5ac41f3bf..0ce43bf53 100644
--- a/scan/sane/sclpml.c
+++ b/scan/sane/sclpml.c
@@ -1319,11 +1319,15 @@ static SANE_Status hpaioAdvanceDocument(hpaioScanner_t hpaio)
/* If there is an ADF see if paper is loaded. */
if (hpaio->supportedAdfModes & ADF_MODE_ADF)
{
- retcode = SclInquire(hpaio->deviceid, hpaio->scan_channelid, SCL_CMD_INQUIRE_DEVICE_PARAMETER,
+ if (hpaio->currentDuplex && hpaio->currentSideNumber == 2)
+ documentLoaded = 1;//No need to check paper in ADF
+ else
+ {
+ retcode = SclInquire(hpaio->deviceid, hpaio->scan_channelid, SCL_CMD_INQUIRE_DEVICE_PARAMETER,
SCL_INQ_ADF_DOCUMENT_LOADED, &documentLoaded, 0, 0);
-
- if (retcode != SANE_STATUS_GOOD)
- goto bugout;
+ if (retcode != SANE_STATUS_GOOD)
+ goto bugout;
+ }
}
/* If in Batch mode, by definition we are in ADF mode. */
@@ -2637,12 +2641,15 @@ SANE_Status sclpml_start(SANE_Handle handle)
if( log_output )
{
char f[256];
- static int cnt=0;
-
- sprintf(f, "/var/log/hp/tmp/mfpdtf_%d.out", cnt++);
-
+ static int cnt=0;
+
+ if (getenv("HOME"))
+ sprintf(f, "%s/.hplip/mfpdtf_%d.out", getenv("HOME"), cnt++);
+ else
+ sprintf(f, "/tmp/mfpdtf_%d.out", cnt++);
+
bug("saving raw image to %s \n", f);
-
+
MfpdtfLogToFile( hpaio->mfpdtf, f );
}