diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:29:05 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:29:05 +0200 |
commit | 324a8a71bb7d9e4f8bc49b6bc47efaf9fb58282e (patch) | |
tree | bd2d48a139bfbe869f4f49359b63097931a45e7b /backend/kvs20xx.c | |
parent | 2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff) | |
parent | 1edb02101a9306fc711cd422ed507d18165b1691 (diff) |
Merge branch 'release/experimental/1.0.27-1_experimental1'experimental/1.0.27-1_experimental1
Diffstat (limited to 'backend/kvs20xx.c')
-rw-r--r-- | backend/kvs20xx.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/backend/kvs20xx.c b/backend/kvs20xx.c index 955252a..8864d7d 100644 --- a/backend/kvs20xx.c +++ b/backend/kvs20xx.c @@ -156,7 +156,8 @@ sane_get_devices (const SANE_Device *** device_list, known_devices[curr_scan_dev].scanner.model, NULL, -1, -1, -1, -1, attach); } - *device_list = (const SANE_Device **) devlist; + if(device_list) + *device_list = (const SANE_Device **) devlist; return SANE_STATUS_GOOD; } @@ -168,6 +169,12 @@ sane_open (SANE_String_Const devname, SANE_Handle * handle) struct scanner *s; SANE_Int h, bus; SANE_Status st; + if (!devlist) + { + st = sane_get_devices (NULL, 0); + if (st) + return st; + } for (i = 0; devlist[i]; i++) { if (!strcmp (devlist[i]->name, devname)) |