Hi Radek,
I found the problem. It occurs when starting (x)scanimage with a device
name
like hp:/dev/scanner and/or the device is not defined in hp.conf.
Please apply the following patch to hp.c:
--- hp.c.orig Fri Dec 25 19:46:57 1998
+++ hp.c Sat Jan 2 20:27:46 1999
@@ -268,12 +268,16 @@
sanei_hp_device_info_get (const char *devname)
{
- HpDeviceInfoList *infolist = &(global.infolist);
+ HpDeviceInfoList *infolist;
HpDeviceInfoList infolistelement;
HpDeviceInfo *info;
+ int retries = 1;
if (!global.is_up) return 0;
+ do
+ {
+ infolist = &(global.infolist);
while (*infolist)
{
infolistelement = *infolist;
@@ -284,6 +288,15 @@
}
infolist = &(infolistelement->next);
}
+
+ /* No configuration found. Assume default */
+ DBG(1, "hp_device_info_get: device %s not configured. Using
default\n",
+ devname);
+ if (hp_device_config_add (devname) != SANE_STATUS_GOOD)
+ return 0;
+ }
+ while (retries-- > 0);
+
return 0;
}
@@ -627,12 +640,13 @@
HpDevice dev = 0;
HpHandle h;
+ RETURN_IF_FAIL( hp_read_config() );
+
if (devicename[0])
RETURN_IF_FAIL( hp_get_dev(devicename, &dev) );
else
{
/* empty devicname -> use first device */
- RETURN_IF_FAIL( hp_read_config() );
if (global.device_list)
dev = global.device_list->dev;
}
-- Peter Kirchgessner WWW: http://www.kirchgessner.net e-mail: peter@kirchgessner.net
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com