handle scanner hot-plug in sane_get_devices

- rescan usb bus
- rescan for new devices
merge-requests/1/head
Stphane Voltz 2013-03-28 21:57:30 +01:00
rodzic 2190d18a63
commit e0e19b413e
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -1102,6 +1102,9 @@ static SANE_Status probe_gt68xx_devices(void)
SANE_Int linenumber;
FILE *fp;
new_dev = 0;
new_dev_len = 0;
new_dev_alloced = 0;
fp = sanei_config_open (GT68XX_CONFIG_FILE);
if (!fp)
@ -1368,6 +1371,10 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
DBG (5, "sane_get_devices: start: local_only = %s\n",
local_only == SANE_TRUE ? "true" : "false");
/* hot-plug case : detection of newly connected scanners */
sanei_usb_scan_devices ();
probe_gt68xx_devices ();
if (devlist)
free (devlist);